zouzx commited on
Commit
12ddb17
·
verified ·
1 Parent(s): a43a8dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -374,7 +374,7 @@ def run_texture(image: Image, mesh_path: str, seed: int, req: gr.Request):
374
  camera_azimuth_deg=[x - 90 for x in [0, 90, 180, 270, 180, 180]],
375
  )
376
 
377
- return textured_glb_path, textured_glb_path
378
 
379
 
380
  with gr.Blocks(title="TripoSG") as demo:
@@ -418,7 +418,6 @@ with gr.Blocks(title="TripoSG") as demo:
418
 
419
  gen_button = gr.Button("Generate Shape", variant="primary")
420
  gen_texture_button = gr.Button("Apply Texture", interactive=False)
421
- download_glb = gr.DownloadButton("Download GLB", interactive=False)
422
 
423
  with gr.Column():
424
  model_output = gr.Model3D(label="Generated GLB", interactive=False)
@@ -455,12 +454,12 @@ with gr.Blocks(title="TripoSG") as demo:
455
  target_face_num
456
  ],
457
  outputs=[model_output]
458
- ).then(lambda: gr.Button(interactive=True), outputs=[download_glb]).then(lambda: gr.Button(interactive=True), outputs=[gen_texture_button])
459
 
460
  gen_texture_button.click(
461
  run_texture,
462
  inputs=[image_prompts, model_output, seed],
463
- outputs=[textured_model_output, download_glb]
464
  )
465
 
466
  demo.load(start_session)
 
374
  camera_azimuth_deg=[x - 90 for x in [0, 90, 180, 270, 180, 180]],
375
  )
376
 
377
+ return textured_glb_path
378
 
379
 
380
  with gr.Blocks(title="TripoSG") as demo:
 
418
 
419
  gen_button = gr.Button("Generate Shape", variant="primary")
420
  gen_texture_button = gr.Button("Apply Texture", interactive=False)
 
421
 
422
  with gr.Column():
423
  model_output = gr.Model3D(label="Generated GLB", interactive=False)
 
454
  target_face_num
455
  ],
456
  outputs=[model_output]
457
+ ).then(lambda: gr.Button(interactive=True), outputs=[gen_texture_button])
458
 
459
  gen_texture_button.click(
460
  run_texture,
461
  inputs=[image_prompts, model_output, seed],
462
+ outputs=[textured_model_output]
463
  )
464
 
465
  demo.load(start_session)