Spaces:
Sleeping
Sleeping
Update code
Browse files
app.py
CHANGED
|
@@ -35,30 +35,53 @@ with gr.Blocks(title="World-in-World: Building a Closed-Loop World Interface to
|
|
| 35 |
gr.HTML("<h1 style='text-align: center; margin-bottom: 1rem'>π World-in-World: Building a Closed-Loop World Interface to Evaluate World Models</h1>")
|
| 36 |
|
| 37 |
with gr.Tabs():
|
| 38 |
-
|
| 39 |
-
with gr.TabItem("π§βπ« Instruction & Environmental Feedback"):
|
| 40 |
with gr.Row():
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
gr.
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
""")
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
gr.
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
with gr.TabItem("π Leaderboard"):
|
| 64 |
leaderboard_table = gr.DataFrame(
|
|
@@ -94,4 +117,4 @@ with gr.Blocks(title="World-in-World: Building a Closed-Loop World Interface to
|
|
| 94 |
""")
|
| 95 |
|
| 96 |
if __name__ == "__main__":
|
| 97 |
-
demo.launch()
|
|
|
|
| 35 |
gr.HTML("<h1 style='text-align: center; margin-bottom: 1rem'>π World-in-World: Building a Closed-Loop World Interface to Evaluate World Models</h1>")
|
| 36 |
|
| 37 |
with gr.Tabs():
|
| 38 |
+
with gr.TabItem("π§βπ« Interactive Demo"):
|
|
|
|
| 39 |
with gr.Row():
|
| 40 |
+
# Left Zone: Instructions
|
| 41 |
+
with gr.Column(scale=2, min_width=350):
|
| 42 |
+
# Mimicking the blue instruction box from the image
|
| 43 |
+
gr.HTML("""
|
| 44 |
+
<div style='background-color: #e6f3ff; border: 1px solid #b3d9ff; border-radius: 8px; padding: 15px; font-family: sans-serif;'>
|
| 45 |
+
<div style='display: flex; align-items: center; margin-bottom: 10px;'>
|
| 46 |
+
<span style='font-size: 24px; margin-right: 10px;'>π§ </span>
|
| 47 |
+
<h3 style='margin: 0; color: #333;'>Instruction:</h3>
|
| 48 |
+
</div>
|
| 49 |
+
<p style='margin: 0; color: #555;'>Navigate to the Toaster in the room and be as close as possible to it.</p>
|
| 50 |
+
</div>
|
| 51 |
+
""")
|
| 52 |
+
# Mimicking the grey planning box from the image
|
| 53 |
+
gr.HTML("""
|
| 54 |
+
<div style='background-color: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; margin-top: 20px; font-family: sans-serif;'>
|
| 55 |
+
<div style='display: flex; align-items: center; margin-bottom: 10px;'>
|
| 56 |
+
<span style='font-size: 24px; margin-right: 10px;'>π¦Ύ</span>
|
| 57 |
+
<h3 style='margin: 0; color: #333;'>Environment Step 4-7:</h3>
|
| 58 |
+
</div>
|
| 59 |
+
<h4 style='margin-top: 10px; margin-bottom: 5px; color: #444;'>Planning:</h4>
|
| 60 |
+
<ol start="4" style='padding-left: 20px; margin: 0; color: #555;'>
|
| 61 |
+
<li>Move leftward by 0.25.</li>
|
| 62 |
+
<li>Move leftward by 0.25.</li>
|
| 63 |
+
<li>Move forward by 0.25.</li>
|
| 64 |
+
<li>Move forward by 0.25.</li>
|
| 65 |
+
</ol>
|
| 66 |
+
</div>
|
| 67 |
""")
|
| 68 |
|
| 69 |
+
# Middle Zone: Closed-Loop Environmental Feedback
|
| 70 |
+
with gr.Column(scale=4, min_width=400):
|
| 71 |
+
gr.HTML("<h2 style='text-align: center; color: #db83b5;'>Closed-Loop Environmental Feedback</h2>")
|
| 72 |
+
with gr.Row():
|
| 73 |
+
# The single video on the left of this zone
|
| 74 |
+
gr.Video("/home/user/app/demo_source_data/AR/FTwan21_lora/X7HyMhZNoso/E145/A001/world_model_gen/bbox_gen_video_1.mp4", label="First Person View", interactive=False)
|
| 75 |
+
# The column with the other two views on the right
|
| 76 |
+
with gr.Column():
|
| 77 |
+
gr.Image("/home/user/app/demo_source_data/AR/FTwan21_lora/5ZKStnWn8Zo/E014/A000/real_obs_bbox.png", label="Bird's Eye View", type="pil", interactive=False)
|
| 78 |
+
gr.Model3D("/home/user/app/demo_source_data/scenes_glb/5ZKStnWn8Zo.glb", label="3D Scene", interactive=False)
|
| 79 |
+
|
| 80 |
+
# Right Zone: World Model's Generation
|
| 81 |
+
with gr.Column(scale=3, min_width=300):
|
| 82 |
+
gr.HTML("<h2 style='text-align: center;'>World Model's Generation</h2>")
|
| 83 |
+
gr.Video("/home/user/app/demo_source_data/AR/FTwan21_lora/X7HyMhZNoso/E145/A001/world_model_gen/gen_video_1.mp4", label="Generated View", interactive=False)
|
| 84 |
+
|
| 85 |
|
| 86 |
with gr.TabItem("π Leaderboard"):
|
| 87 |
leaderboard_table = gr.DataFrame(
|
|
|
|
| 117 |
""")
|
| 118 |
|
| 119 |
if __name__ == "__main__":
|
| 120 |
+
demo.launch()
|