Hi,
I have a problem with Gradio and HuggingFace Spaces.
The problem is that when I try to set examples in this way:
intput_components = [
input_video,
dd_model,
features,
dd_track_points,
slide_threshold,
]
output_components = "playablevideo"
example_list = [["examples/" + example] for example in os.listdir("examples")]
iface = gr.Interface(
fn=inference,
inputs=intput_components,
outputs=output_components,
examples=example_list,
)
iface.launch()
where each element of the input_components list is a Gradio component.
When I run this code locally I do not have any problems showing the examples (mp4 videos).
I have Git LFS set properly.
This is the error that the logs show me when I run this code on Spaces, but if I remove the attribute examples there is no error in that execution. For this reason, I do not understand the error and there is any possibility of a bug on the deploy process.
Traceback (most recent call last):
File "app.py", line 40, in <module>
iface = gr.Interface(
File "/home/user/.local/lib/python3.8/site-packages/gradio/interface.py", line 626, in __init__
self.examples_handler = Examples(
File "/home/user/.local/lib/python3.8/site-packages/gradio/examples.py", line 56, in create_examples
utils.synchronize_async(examples_obj.create)
File "/home/user/.local/lib/python3.8/site-packages/gradio/utils.py", line 364, in synchronize_async
return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/fsspec/asyn.py", line 96, in sync
raise return_result
File "/home/user/.local/lib/python3.8/site-packages/fsspec/asyn.py", line 53, in _runner
result[0] = await coro
File "/home/user/.local/lib/python3.8/site-packages/gradio/examples.py", line 208, in create
await self.cache_interface_examples()
File "/home/user/.local/lib/python3.8/site-packages/gradio/examples.py", line 246, in cache_interface_examples
prediction = await self.predict_example(example_id)
File "/home/user/.local/lib/python3.8/site-packages/gradio/examples.py", line 263, in predict_example
predictions = await anyio.to_thread.run_sync(self.fn, *processed_input)
File "/home/user/.local/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/home/user/.local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
TypeError: inference() missing 4 required positional arguments: 'model', 'features', 'track_points', and 'model_threshold'