Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ from keybert import KeyBERT
|
|
4 |
model = KeyBERT("sentence-transformers/xlm-r-distilroberta-base-paraphrase-v1")
|
5 |
|
6 |
def keywords(text):
|
7 |
-
keywords = model.extract_keywords(text,keyphrase_ngram_range=(1,2),top_n=10)
|
8 |
keywords = dict(keywords)
|
9 |
return keywords
|
10 |
|
11 |
-
gr.Interface(keywords, "text", "text",title="Keyword Extractor").launch()
|
|
|
4 |
model = KeyBERT("sentence-transformers/xlm-r-distilroberta-base-paraphrase-v1")
|
5 |
|
6 |
def keywords(text):
|
7 |
+
keywords = model.extract_keywords(text, keyphrase_ngram_range=(1,2), top_n=10)
|
8 |
keywords = dict(keywords)
|
9 |
return keywords
|
10 |
|
11 |
+
gr.Interface(keywords, "text", "text", title="Keyword Extractor").launch()
|