text-keywords / app.py
vinni1484's picture
Create app.py
086e787
raw
history blame
333 Bytes
import gradio as gr
from keybert import KeyBERT
def keywords(text):
model = KeyBERT("sentence-transformers/xlm-r-distilroberta-base-paraphrase-v1")
keywords = model.extract_keywords("The quick brown fox jumps over the lazy dog.")
return keywords
gr.Interface(keywords, "text", "text",title="Keyword Extractor").launch()