getting this error

#2
by softmax12 - opened

** Inside Enngine **
Fetching model from: https://huggingface.co/flair/ner-english-ontonotes-large
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 374, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1017, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 835, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.8/dist-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "", line 92, in engine
ner = gr.Interface.load("huggingface/flair/ner-english-ontonotes-large")
File "/usr/local/lib/python3.8/dist-packages/gradio/interface.py", line 102, in load
return super().load(name=name, src=src, api_key=api_key, alias=alias, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1171, in load
return external.load_blocks_from_repo(name, src, api_key, alias, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/gradio/external.py", line 70, in load_blocks_from_repo
blocks: gradio.Blocks = factory_methods[src](name, api_key, alias, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/gradio/external.py", line 365, in from_model
interface = gradio.Interface(**kwargs)
File "/usr/local/lib/python3.8/dist-packages/gradio/interface.py", line 485, in init
self.render_article()
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1100, in exit
self.app = routes.App.create_app(self)
File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 138, in create_app
app = App(default_response_class=ORJSONResponse)
File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 109, in init
self.lock = asyncio.Lock()
File "/usr/lib/python3.8/asyncio/locks.py", line 164, in init
self._loop = events.get_event_loop()
File "/usr/lib/python3.8/asyncio/events.py", line 639, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'AnyIO worker thread'.

Sign up or log in to comment