Spaces:
Runtime error
Runtime error
Wenzheng Chang
commited on
Commit
·
5205b4d
1
Parent(s):
b1e9cb1
update examples
Browse files
app.py
CHANGED
@@ -1648,12 +1648,47 @@ with gr.Blocks(
|
|
1648 |
|
1649 |
# Example Accordion
|
1650 |
with gr.Accordion("Examples", open=False):
|
1651 |
-
gr.
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1657 |
|
1658 |
# Event handlers
|
1659 |
task.change(
|
|
|
1648 |
|
1649 |
# Example Accordion
|
1650 |
with gr.Accordion("Examples", open=False):
|
1651 |
+
with gr.Tab("Reconstruction"):
|
1652 |
+
reconstruction_examples = gr.Examples(
|
1653 |
+
examples=[
|
1654 |
+
["assets/example_videos/bridge.mp4"],
|
1655 |
+
["assets/example_videos/moviegen.mp4"],
|
1656 |
+
["assets/example_videos/nuscenes.mp4"],
|
1657 |
+
["assets/example_videos/veo2.mp4"],
|
1658 |
+
],
|
1659 |
+
inputs=[video_input],
|
1660 |
+
label="Reconstruction Examples",
|
1661 |
+
fn=lambda x: gr.update(value="reconstruction"), # Auto-select reconstruction task
|
1662 |
+
targets=[task]
|
1663 |
+
)
|
1664 |
+
|
1665 |
+
with gr.Tab("Prediction"):
|
1666 |
+
prediction_examples = gr.Examples(
|
1667 |
+
examples=[
|
1668 |
+
["assets/example_obs/car.png"],
|
1669 |
+
["assets/example_obs/cartoon.png"],
|
1670 |
+
["assets/example_obs/garden.jpg"],
|
1671 |
+
["assets/example_obs/room.jpg"],
|
1672 |
+
],
|
1673 |
+
inputs=[image_input],
|
1674 |
+
label="Prediction Examples",
|
1675 |
+
fn=lambda x: gr.update(value="prediction"), # Auto-select prediction task
|
1676 |
+
targets=[task]
|
1677 |
+
)
|
1678 |
+
|
1679 |
+
with gr.Tab("Planning"):
|
1680 |
+
planning_examples = gr.Examples(
|
1681 |
+
examples=[
|
1682 |
+
["assets/example_obs_goal/01_obs.png", "assets/example_obs_goal/01_goal.png"],
|
1683 |
+
["assets/example_obs_goal/02_obs.png", "assets/example_obs_goal/02_goal.png"],
|
1684 |
+
["assets/example_obs_goal/03_obs.png", "assets/example_obs_goal/03_goal.png"],
|
1685 |
+
["assets/example_obs_goal/04_obs.png", "assets/example_obs_goal/04_goal.png"],
|
1686 |
+
],
|
1687 |
+
inputs=[image_input, goal_input],
|
1688 |
+
label="Planning Examples",
|
1689 |
+
fn=lambda x: gr.update(value="planning"), # Auto-select planning task
|
1690 |
+
targets=[task]
|
1691 |
+
)
|
1692 |
|
1693 |
# Event handlers
|
1694 |
task.change(
|