David Li
fix: adding gradio ui
e5c1842
raw
history blame contribute delete
338 Bytes
import gradio as gr
import spacy
nlp = spacy.load("en_stonk_pipeline", disable=["lemmatizer"])
def text_analysis(text):
doc = nlp(text)
rendered_spacy = spacy.displacy.render(
doc, style="ent", page=False)
return rendered_spacy
iface = gr.Interface(fn=text_analysis, inputs="text", outputs="html")
iface.launch()