Spaces:
Runtime error
Runtime error
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() |