rajesh1729's picture
Update app.py
5ab2465
raw
history blame contribute delete
256 Bytes
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()