debugging
Browse files
app.py
CHANGED
@@ -194,6 +194,7 @@ with gr.Blocks() as demo:
|
|
194 |
# Todo - getting errors when using video output
|
195 |
video_output = gr.Video(label="Generated 3D Asset", autoplay=True, loop=True, height=300)
|
196 |
|
|
|
197 |
# Todo - getting errors when using model output
|
198 |
# model_output = LitModel3D(label="Extracted GLB", exposure=20.0, height=300)
|
199 |
download_glb = gr.DownloadButton(label="Download GLB", interactive=False)
|
@@ -241,19 +242,19 @@ with gr.Blocks() as demo:
|
|
241 |
outputs=[extract_glb_btn],
|
242 |
)
|
243 |
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
|
258 |
|
259 |
# Cleans up the temporary directory every 10 minutes
|
|
|
194 |
# Todo - getting errors when using video output
|
195 |
video_output = gr.Video(label="Generated 3D Asset", autoplay=True, loop=True, height=300)
|
196 |
|
197 |
+
model_output = gr.Model3D(label="Extracted GLB")
|
198 |
# Todo - getting errors when using model output
|
199 |
# model_output = LitModel3D(label="Extracted GLB", exposure=20.0, height=300)
|
200 |
download_glb = gr.DownloadButton(label="Download GLB", interactive=False)
|
|
|
242 |
outputs=[extract_glb_btn],
|
243 |
)
|
244 |
|
245 |
+
extract_glb_btn.click(
|
246 |
+
extract_glb,
|
247 |
+
inputs=[output_buf, mesh_simplify, texture_size],
|
248 |
+
outputs=[model_output, download_glb],
|
249 |
+
).then(
|
250 |
+
activate_button,
|
251 |
+
outputs=[download_glb],
|
252 |
+
)
|
253 |
+
|
254 |
+
model_output.clear(
|
255 |
+
deactivate_button,
|
256 |
+
outputs=[download_glb],
|
257 |
+
)
|
258 |
|
259 |
|
260 |
# Cleans up the temporary directory every 10 minutes
|