Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def get_keybert_results_with_vectorizer(text, number_of_results=20):
|
|
33 |
keywords = kw_extractor.extract_keywords(text, vectorizer=KeyphraseCountVectorizer(), stop_words=None, top_n=number_of_results)
|
34 |
return keywords
|
35 |
|
36 |
-
def t5_paraphraser(text, number_of_results=
|
37 |
text = "paraphrase: " + text + " </s>"
|
38 |
max_len = 2048
|
39 |
encoding = t5_tokenizer.encode_plus(text, pad_to_max_length=True, return_tensors="pt")
|
|
|
33 |
keywords = kw_extractor.extract_keywords(text, vectorizer=KeyphraseCountVectorizer(), stop_words=None, top_n=number_of_results)
|
34 |
return keywords
|
35 |
|
36 |
+
def t5_paraphraser(text, number_of_results=5):
|
37 |
text = "paraphrase: " + text + " </s>"
|
38 |
max_len = 2048
|
39 |
encoding = t5_tokenizer.encode_plus(text, pad_to_max_length=True, return_tensors="pt")
|