devendergarg14 commited on
Commit
d6c1f78
1 Parent(s): d5db245

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -3,7 +3,7 @@ generator = pipeline('text-generation', model='EleutherAI/gpt-neo-2.7B')
3
  def query(input_sentence,num,start):
4
  string3=[]
5
  for i in range(0,num):
6
- 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 """
7
  full_input=intial+"original:"+input_sentence + "\n paraphrase:"+start
8
  string1=generator("EleutherAI has", do_sample=True, min_length=len(full_input.split()))[0]['generated_text']
9
  string2=string1.split('paraphrase:',3)[-1]
 
3
  def query(input_sentence,num,start):
4
  string3=[]
5
  for i in range(0,num):
6
+ #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 """
7
  full_input=intial+"original:"+input_sentence + "\n paraphrase:"+start
8
  string1=generator("EleutherAI has", do_sample=True, min_length=len(full_input.split()))[0]['generated_text']
9
  string2=string1.split('paraphrase:',3)[-1]