opsiclear-admin commited on
Commit
2ccba64
·
verified ·
1 Parent(s): 405f332

Fix GLB export: remove hidden visibility, return plain paths

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -690,7 +690,7 @@ def extract_glb(
690
  glb_path = os.path.join(user_dir, f'sample_{timestamp}.glb')
691
  glb.export(glb_path, extension_webp=True)
692
  torch.cuda.empty_cache()
693
- return gr.update(value=glb_path, visible=True), gr.update(value=glb_path, visible=True)
694
 
695
 
696
  with gr.Blocks(theme=gr.themes.Soft(primary_hue="orange", neutral_hue="slate")) as demo:
@@ -745,8 +745,8 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="orange", neutral_hue="slate"))
745
 
746
  with gr.Column(scale=10):
747
  preview_output = gr.HTML(empty_html, label="3D Asset Preview", show_label=True, container=True)
748
- glb_output = gr.Model3D(label="Extracted GLB", height=400, show_label=True, display_mode="solid", clear_color=(0.25, 0.25, 0.25, 1.0), visible=False)
749
- download_btn = gr.DownloadButton(label="Download GLB", visible=False)
750
 
751
  with gr.Row():
752
  generate_btn = gr.Button("Generate", variant="primary")
 
690
  glb_path = os.path.join(user_dir, f'sample_{timestamp}.glb')
691
  glb.export(glb_path, extension_webp=True)
692
  torch.cuda.empty_cache()
693
+ return glb_path, glb_path
694
 
695
 
696
  with gr.Blocks(theme=gr.themes.Soft(primary_hue="orange", neutral_hue="slate")) as demo:
 
745
 
746
  with gr.Column(scale=10):
747
  preview_output = gr.HTML(empty_html, label="3D Asset Preview", show_label=True, container=True)
748
+ glb_output = gr.Model3D(label="Extracted GLB", height=400, show_label=True, display_mode="solid", clear_color=(0.25, 0.25, 0.25, 1.0))
749
+ download_btn = gr.DownloadButton(label="Download GLB")
750
 
751
  with gr.Row():
752
  generate_btn = gr.Button("Generate", variant="primary")