gensym commited on
Commit
6a3f855
·
1 Parent(s): 698185d
Files changed (1) hide show
  1. app.py +14 -13
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
- # extract_glb_btn.click(
245
- # extract_glb,
246
- # inputs=[output_buf, mesh_simplify, texture_size],
247
- # outputs=[model_output, download_glb],
248
- # ).then(
249
- # activate_button,
250
- # outputs=[download_glb],
251
- # )
252
-
253
- # model_output.clear(
254
- # deactivate_button,
255
- # outputs=[download_glb],
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