Spaces:
Sleeping
Sleeping
Add build LLMPhy app
Browse files
app.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from tray_sim import run_tray_simulation
|
| 3 |
+
|
| 4 |
+
def simulate_and_render(seed: int):
|
| 5 |
+
gif_path = run_tray_simulation(seed)
|
| 6 |
+
return gif_path
|
| 7 |
+
|
| 8 |
+
iface = gr.Interface(
|
| 9 |
+
fn=simulate_and_render,
|
| 10 |
+
inputs=gr.Number(label="Random Seed", value=0),
|
| 11 |
+
outputs=gr.Image(type="filepath", label="Simulation"),
|
| 12 |
+
title="TraySim Simulation Viewer",
|
| 13 |
+
description="Simulates object drop on a tray using MuJoCo and shows the result as a GIF."
|
| 14 |
+
)
|
| 15 |
+
|
| 16 |
+
if __name__ == "__main__":
|
| 17 |
+
iface.launch()
|