Spaces:
Runtime error
Runtime error
File size: 515 Bytes
65a3873 c7f67f8 65a3873 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
#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()
|