devendergarg14 commited on
Commit
494e732
1 Parent(s): b7585c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ generator = pipeline('text-generation', model='EleutherAI/gpt-neo-1.3B')
5
  def query(input_sentence,num,start):
6
  string3=[]
7
  for i in range(0,num):
8
- intial="""These are the few examples of converting original sentences into paraphrased sentences.\n original: Symptoms of influenza include fever and nasal congestion.\n paraphrase: A stuffy nose and elevated temperature are signs you may have the flu.\n original: Maintaining a creative work environment is not only beneficial to employees, but also to company profits.\n paraphrase: Having a fertile work environment can increase productivity and profitability.\n """
9
  full_input=intial+"original:"+input_sentence + "\n paraphrase:"+start
10
  string1=generator(full_input, do_sample=True,max_length= len(full_input.split())+70,min_length=len(full_input.split())+70,temperature=0.65+i*0.05+0.01*random.uniform(1, 10))[0]['generated_text']
11
  string2=string1.split('paraphrase:',3)[-1]
 
5
  def query(input_sentence,num,start):
6
  string3=[]
7
  for i in range(0,num):
8
+ intial="""These are the few examples of converting original sentences into paraphrased sentences.\n original: The gray clouds were a warning of an approaching storm.\n paraphrase: The coming storm was foretold by the dark clouds.\n original: Giraffes like Acacia leaves and hay, and they can consume 75 pounds of food a day.\n paraphrase: A giraffe can eat up to 75 pounds of Acacia leaves and hay daily.\n """
9
  full_input=intial+"original:"+input_sentence + "\n paraphrase:"+start
10
  string1=generator(full_input, do_sample=True,max_length= len(full_input.split())+70,min_length=len(full_input.split())+70,temperature=0.65+i*0.05+0.01*random.uniform(1, 10))[0]['generated_text']
11
  string2=string1.split('paraphrase:',3)[-1]