from transformers import pipeline import gradio as gr ner_pipeline = pipeline("ner", model="mrojas/spanish-disease-tagger") def ner(text): output = ner_pipeline(text) return {"text": text, "entities": output} demo = gr.Interface(ner, gr.Textbox(placeholder="Ingrese oración aquí..."), gr.HighlightedText()) demo.launch()