File size: 365 Bytes
b1bb1db
492fc53
b1bb1db
 
 
 
 
 
 
 
 
1f8c7a1
b1bb1db
7890245
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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()