Spaces:
Runtime error
Runtime error
File size: 338 Bytes
e5c1842 |
1 2 3 4 5 6 7 8 9 10 11 12 |
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() |