5ab2465 3c4fd84 5ab2465 e7321fc 3c4fd84
1
2
3
4
5
6
7
8
9
10
11
12
import spacy import gradio as gr nlp = spacy.load("en_core_web_sm") def ner(sentence): doc = nlp(sentence) ents = [(e.text, e.label_) for e in doc.ents] return ents iface = gr.Interface(fn=ner, inputs="text", outputs = "text") iface.launch()