FlatNER / app.py
naghamghanim's picture
Update app.py
65a3873 verified
raw
history blame contribute delete
515 Bytes
#import gradio as gr
#gr.load("models/SinaLab/ArabicWojood-FlatNER").launch()
from transformers import pipeline
import gradio as gr
ner_pipeline = pipeline("ner")
examples = [
"Does Chicago have any stores and does Joe live here?",
]
def ner(text):
output = ner_pipeline(text)
return {"text": text, "entities": output}
demo = gr.Interface(ner,
gr.Textbox(placeholder="انا اسمي سامي"),
gr.HighlightedText(),
examples=examples)
demo.launch()