import gradio as gr from keybert import KeyBERT model = KeyBERT("sentence-transformers/xlm-r-distilroberta-base-paraphrase-v1") def keywords(text): keywords = model.extract_keywords(text,top_n=10) keywords = dict(keywords) return keywords gr.Interface(keywords, "text", "text",title="Keyword Extractor").launch()