Spaces:
Runtime error
Runtime error
Commit
·
c8bd88f
1
Parent(s):
058da39
removed future
Browse files
app.py
CHANGED
@@ -13,7 +13,6 @@ def cleaned_para(input_sentence):
|
|
13 |
p=generator('<s>'+input_sentence+ '</s>>>>><p>',do_sample=True,max_length=len(input_sentence.split(" "))+200,temperature = 0.8,repetition_penalty=1.2,top_p=0.4,top_k=1)
|
14 |
return p[0]['generated_text'].split('</s>>>>><p>')[1].split('</p>')[0]
|
15 |
|
16 |
-
from __future__ import unicode_literals, print_function
|
17 |
from spacy.lang.en import English # updated
|
18 |
|
19 |
def sentensizer(raw_text):
|
@@ -24,8 +23,7 @@ def sentensizer(raw_text):
|
|
24 |
print(sentences)
|
25 |
return sentences
|
26 |
|
27 |
-
|
28 |
-
text=context
|
29 |
def paraphraser(text):
|
30 |
begin=time.time()
|
31 |
x=[cleaned_para(str(i)) for i in sentensizer(text)]
|
|
|
13 |
p=generator('<s>'+input_sentence+ '</s>>>>><p>',do_sample=True,max_length=len(input_sentence.split(" "))+200,temperature = 0.8,repetition_penalty=1.2,top_p=0.4,top_k=1)
|
14 |
return p[0]['generated_text'].split('</s>>>>><p>')[1].split('</p>')[0]
|
15 |
|
|
|
16 |
from spacy.lang.en import English # updated
|
17 |
|
18 |
def sentensizer(raw_text):
|
|
|
23 |
print(sentences)
|
24 |
return sentences
|
25 |
|
26 |
+
|
|
|
27 |
def paraphraser(text):
|
28 |
begin=time.time()
|
29 |
x=[cleaned_para(str(i)) for i in sentensizer(text)]
|