I can run demo.py and demo.ipynb, but when I run the app.py file by the command python demo/app.py, the following error occurs:
Traceback (most recent call last):
File "/home/luoc/workspace/ODISE/demo/app.py", line 294, in
examples_handler = gr.Examples(
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/helpers.py", line 71, in create_examples
client_utils.synchronize_async(examples_obj.create)
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio_client/utils.py", line 359, in synchronize_async
return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, *kwargs) # type: ignore
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/fsspec/asyn.py", line 100, in sync
raise return_result
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/fsspec/asyn.py", line 55, in _runner
result[0] = await coro
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/helpers.py", line 278, in create
await self.cache()
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/helpers.py", line 312, in cache
prediction = await Context.root_block.process_api(
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/blocks.py", line 1108, in process_api
result = await self.call_function(
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/blocks.py", line 915, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, args)
File "/home/luoc/workspace/ODISE/demo/app.py", line 253, in inference
model=models[model_name],
KeyError: None
I can run demo.py and demo.ipynb, but when I run the app.py file by the command
python demo/app.py
, the following error occurs:Traceback (most recent call last): File "/home/luoc/workspace/ODISE/demo/app.py", line 294, in
examples_handler = gr.Examples(
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/helpers.py", line 71, in create_examples
client_utils.synchronize_async(examples_obj.create)
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio_client/utils.py", line 359, in synchronize_async
return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, *kwargs) # type: ignore
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/fsspec/asyn.py", line 100, in sync
raise return_result
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/fsspec/asyn.py", line 55, in _runner
result[0] = await coro
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/helpers.py", line 278, in create
await self.cache()
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/helpers.py", line 312, in cache
prediction = await Context.root_block.process_api(
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/blocks.py", line 1108, in process_api
result = await self.call_function(
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/blocks.py", line 915, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, args)
File "/home/luoc/workspace/ODISE/demo/app.py", line 253, in inference
model=models[model_name],
KeyError: None