Spaces:
Runtime error
Runtime error
from transformers import pipeline | |
import gradio as gr | |
ner_pipeline = pipeline("ner", model="dl-ru/rubert-tiny2-srl") | |
examples = [ | |
"Мне всё нрав", | |
] | |
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() |