Spaces:
Running
on
Zero
Running
on
Zero
gemini hidden endpoint
Browse files
app.py
CHANGED
@@ -174,6 +174,10 @@ def extract_gaussian(state: dict, req: gr.Request) -> Tuple[str, str]:
|
|
174 |
|
175 |
output_buf = gr.State()
|
176 |
video_output = gr.Video(label="Generated 3D Asset", autoplay=True, loop=True, height=300)
|
|
|
|
|
|
|
|
|
177 |
|
178 |
with gr.Blocks(delete_cache=(600, 600)) as demo:
|
179 |
gr.Markdown("""
|
@@ -232,7 +236,8 @@ with gr.Blocks(delete_cache=(600, 600)) as demo:
|
|
232 |
).then(
|
233 |
text_to_3d,
|
234 |
inputs=[text_prompt, seed, ss_guidance_strength, ss_sampling_steps, slat_guidance_strength, slat_sampling_steps],
|
235 |
-
|
|
|
236 |
).then(
|
237 |
lambda: tuple([gr.Button(interactive=True), gr.Button(interactive=True)]),
|
238 |
outputs=[extract_glb_btn, extract_gs_btn],
|
|
|
174 |
|
175 |
output_buf = gr.State()
|
176 |
video_output = gr.Video(label="Generated 3D Asset", autoplay=True, loop=True, height=300)
|
177 |
+
model_output = gr.Model3D(label="Extracted GLB/Gaussian", height=300)
|
178 |
+
|
179 |
+
# Add a hidden JSON output for the state object for API calls
|
180 |
+
state_output_json = gr.JSON(visible=False, label="State JSON Output")
|
181 |
|
182 |
with gr.Blocks(delete_cache=(600, 600)) as demo:
|
183 |
gr.Markdown("""
|
|
|
236 |
).then(
|
237 |
text_to_3d,
|
238 |
inputs=[text_prompt, seed, ss_guidance_strength, ss_sampling_steps, slat_guidance_strength, slat_sampling_steps],
|
239 |
+
# Output state to hidden JSON first, then video to visible component, then state to internal buffer
|
240 |
+
outputs=[state_output_json, video_output, output_buf],
|
241 |
).then(
|
242 |
lambda: tuple([gr.Button(interactive=True), gr.Button(interactive=True)]),
|
243 |
outputs=[extract_glb_btn, extract_gs_btn],
|