Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from keybert import KeyBERT
|
3 |
+
|
4 |
+
def keywords(text):
|
5 |
+
model = KeyBERT("sentence-transformers/xlm-r-distilroberta-base-paraphrase-v1")
|
6 |
+
keywords = model.extract_keywords("The quick brown fox jumps over the lazy dog.")
|
7 |
+
return keywords
|
8 |
+
|
9 |
+
gr.Interface(keywords, "text", "text",title="Keyword Extractor").launch()
|