Spaces:
Runtime error
Runtime error
Commit
·
b77de08
1
Parent(s):
5205b4d
example init
Browse files
app.py
CHANGED
@@ -461,7 +461,7 @@ def save_output_files(
|
|
461 |
return paths
|
462 |
|
463 |
|
464 |
-
@spaces.GPU(duration=
|
465 |
def process_reconstruction(
|
466 |
video_file,
|
467 |
height,
|
@@ -1647,48 +1647,46 @@ with gr.Blocks(
|
|
1647 |
)
|
1648 |
|
1649 |
# Example Accordion
|
1650 |
-
with gr.
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
targets=[task]
|
1663 |
-
)
|
1664 |
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
|
1693 |
# Event handlers
|
1694 |
task.change(
|
|
|
461 |
return paths
|
462 |
|
463 |
|
464 |
+
@spaces.GPU(duration=100)
|
465 |
def process_reconstruction(
|
466 |
video_file,
|
467 |
height,
|
|
|
1647 |
)
|
1648 |
|
1649 |
# Example Accordion
|
1650 |
+
with gr.Tab("Reconstruction"):
|
1651 |
+
reconstruction_examples = gr.Examples(
|
1652 |
+
examples=[
|
1653 |
+
["assets/example_videos/bridge.mp4"],
|
1654 |
+
["assets/example_videos/moviegen.mp4"],
|
1655 |
+
["assets/example_videos/nuscenes.mp4"],
|
1656 |
+
["assets/example_videos/veo2.mp4"],
|
1657 |
+
],
|
1658 |
+
inputs=[video_input],
|
1659 |
+
label="Reconstruction Examples",
|
1660 |
+
fn=lambda x: {"task": gr.update(value="reconstruction")}
|
1661 |
+
)
|
|
|
|
|
1662 |
|
1663 |
+
with gr.Tab("Prediction"):
|
1664 |
+
prediction_examples = gr.Examples(
|
1665 |
+
examples=[
|
1666 |
+
["assets/example_obs/car.png"],
|
1667 |
+
["assets/example_obs/cartoon.png"],
|
1668 |
+
["assets/example_obs/garden.jpg"],
|
1669 |
+
["assets/example_obs/room.jpg"],
|
1670 |
+
],
|
1671 |
+
inputs=[image_input],
|
1672 |
+
label="Prediction Examples",
|
1673 |
+
fn=lambda x: {"task": gr.update(value="prediction")},
|
1674 |
+
examples_per_page=4,
|
1675 |
+
)
|
1676 |
|
1677 |
+
with gr.Tab("Planning"):
|
1678 |
+
planning_examples = gr.Examples(
|
1679 |
+
examples=[
|
1680 |
+
["assets/example_obs_goal/01_obs.png", "assets/example_obs_goal/01_goal.png"],
|
1681 |
+
["assets/example_obs_goal/02_obs.png", "assets/example_obs_goal/02_goal.png"],
|
1682 |
+
["assets/example_obs_goal/03_obs.png", "assets/example_obs_goal/03_goal.png"],
|
1683 |
+
["assets/example_obs_goal/04_obs.png", "assets/example_obs_goal/04_goal.png"],
|
1684 |
+
],
|
1685 |
+
inputs=[image_input, goal_input],
|
1686 |
+
label="Planning Examples",
|
1687 |
+
fn=lambda x: {"task": gr.update(value="planning")},
|
1688 |
+
examples_per_page=4,
|
1689 |
+
)
|
1690 |
|
1691 |
# Event handlers
|
1692 |
task.change(
|