vinni1484 commited on
Commit
086e787
1 Parent(s): 0bcb614

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
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()