Commit
·
67534bb
1
Parent(s):
40e24ac
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ def query(input_sentence,num,start):
|
|
6 |
for i in range(0,num):
|
7 |
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 """
|
8 |
full_input=intial+"original:"+input_sentence + "\n paraphrase:"+start
|
9 |
-
string1=generator(intial, do_sample=True,max_length= len(full_input.split())+80,min_length=len(full_input.split())+80,temperature=0.65+i*0.05)[0
|
10 |
string2=string1.split('paraphrase:',3)[-1]
|
11 |
string3.append(string2.split('.',1)[0]+".")
|
12 |
return '\n\n'.join([i for i in string3[0:]])
|
|
|
6 |
for i in range(0,num):
|
7 |
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 """
|
8 |
full_input=intial+"original:"+input_sentence + "\n paraphrase:"+start
|
9 |
+
string1=generator(intial, do_sample=True,max_length= len(full_input.split())+80,min_length=len(full_input.split())+80,temperature=0.65+i*0.05)[0]['generated_text']
|
10 |
string2=string1.split('paraphrase:',3)[-1]
|
11 |
string3.append(string2.split('.',1)[0]+".")
|
12 |
return '\n\n'.join([i for i in string3[0:]])
|