Spaces:
Runtime error
Runtime error
import gradio as gr | |
from examples.common import NLP | |
from examples.keyphrases import demo as keyphrases_demo | |
from examples.anon import demo as anon_demo | |
from examples.relation import demo as relation_demo | |
from examples.dbpedia import demo as dbpedia_demo | |
demo = gr.Blocks() | |
with demo: | |
gr.Markdown("# HuSpaCy Examples") | |
gr.TabbedInterface( | |
interface_list=[keyphrases_demo, anon_demo, relation_demo, dbpedia_demo], | |
tab_names=["Keyphrase extraction", "Text anonymization", "Relation Extraction", "DBpedia Spotlight"], | |
) | |
if __name__ == '__main__': | |
NLP.add_pipe("dbpedia_spotlight", config={'dbpedia_rest_endpoint': 'https://dbpedia-spotlight.dsd.sztaki.hu/hu', 'overwrite_ents': False}) | |
demo.launch() | |