Gradio Deployment Notes
app.pydefinesbuild_interface()and only launches the demo when run as__main__. Hugging Face imports the module to build the config, so expensive work (dataset download) happens lazily vialru_cachehelpers.- Dataset paths follow the LeRobot layout (
data/chunk-000/...,videos/chunk-000/rgb/...). Files are cached insidedataset_cache/bysnapshot_download. - Default episode data is preloaded when the Blocks tree is constructed, so all widgets render immediately without calling the API.
- User interactions run through
episode_dropdown.change→load_episode_payload, which returns[instruction, video_path, fig_x, ...]. demo.queue().launch(show_api=False)disables the “Use via API” panel (Gradio 5.7.0 had a schema bug with Plot outputs that broke API info).- If you need to expose the API again, make sure to upgrade to a Gradio release where plot schema serialization works, then set
show_api=True.