Spaces:
Running on Zero
Running on Zero
bennyguo commited on
Commit ·
5df883c
1
Parent(s): db54c72
Inline image_in render; fix example-click misrouted to generate
Browse filesThe previous deferred-render pattern (image_in declared with render=False
then rendered inside a column after gr.Examples) caused gr.Examples to
wire its click event to the next registered handler (run_btn.click ->
generate), but with only [image_in] as the input list. That produced
"generate didn't receive enough input values (needed: 6, got: 1)".
Declaring image_in inside the column directly and putting gr.Examples
immediately after fixes the wiring.
app.py
CHANGED
|
@@ -136,20 +136,18 @@ with gr.Blocks(title="TripoSplat") as demo:
|
|
| 136 |
"[Read Paper](https://arxiv.org/abs/2605.16355) | [Technical Blog](https://www.tripo3d.ai/research/triposplat) | [GitHub](https://github.com/VAST-AI-Research/TripoSplat)"
|
| 137 |
)
|
| 138 |
|
| 139 |
-
image_in = gr.Image(label="Input image", type="pil", image_mode="RGBA",
|
| 140 |
-
height=320, render=False)
|
| 141 |
-
|
| 142 |
-
gr.Examples(
|
| 143 |
-
examples=[[p] for p in EXAMPLES],
|
| 144 |
-
inputs=[image_in],
|
| 145 |
-
label="Examples (click to load)",
|
| 146 |
-
examples_per_page=10,
|
| 147 |
-
cache_examples=False,
|
| 148 |
-
)
|
| 149 |
-
|
| 150 |
with gr.Row():
|
| 151 |
with gr.Column(scale=1):
|
| 152 |
-
image_in.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
with gr.Accordion("Sampling settings", open=False):
|
| 155 |
seed_in = gr.Number(label="Seed", value=42, precision=0)
|
|
|
|
| 136 |
"[Read Paper](https://arxiv.org/abs/2605.16355) | [Technical Blog](https://www.tripo3d.ai/research/triposplat) | [GitHub](https://github.com/VAST-AI-Research/TripoSplat)"
|
| 137 |
)
|
| 138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
with gr.Row():
|
| 140 |
with gr.Column(scale=1):
|
| 141 |
+
image_in = gr.Image(label="Input image", type="pil", image_mode="RGBA",
|
| 142 |
+
height=320)
|
| 143 |
+
|
| 144 |
+
gr.Examples(
|
| 145 |
+
examples=[[p] for p in EXAMPLES],
|
| 146 |
+
inputs=[image_in],
|
| 147 |
+
label="Examples (click to load)",
|
| 148 |
+
examples_per_page=10,
|
| 149 |
+
cache_examples=False,
|
| 150 |
+
)
|
| 151 |
|
| 152 |
with gr.Accordion("Sampling settings", open=False):
|
| 153 |
seed_in = gr.Number(label="Seed", value=42, precision=0)
|