cavargas10 commited on
Commit
f5762bb
·
verified ·
1 Parent(s): af5e8fe

Update gradio_app/gradio_3dgen.py

Browse files
Files changed (1) hide show
  1. gradio_app/gradio_3dgen.py +10 -9
gradio_app/gradio_3dgen.py CHANGED
@@ -8,6 +8,7 @@ from gradio_app.custom_models.mvimg_prediction import run_mvprediction
8
  from gradio_app.custom_models.normal_prediction import predict_normals
9
  from scripts.refine_lr_to_sr import run_sr_fast
10
  from scripts.utils import save_glb_and_video
 
11
  from scripts.multiview_inference import geo_reconstruct_part1, geo_reconstruct_part2, geo_reconstruct_part3
12
 
13
  @spaces.GPU(duration=100)
@@ -58,24 +59,24 @@ def create_ui(concurrency_id="wkl"):
58
 
59
 
60
  with gr.Column(scale=1):
61
- # Export mesh display
62
  output_mesh = gr.Model3D(value=None, label="Mesh Model", show_label=True, height=320, camera_position=(90, 90, 2))
63
- output_video = gr.Video(label="Preview (360° Video)", show_label=True, show_share_button=True, height=320, visible=True) # Habilitado
64
 
65
  input_processing = gr.Checkbox(
66
  value=True,
67
  label='Remove Background',
68
  visible=True,
69
  )
70
- do_refine = gr.Checkbox(value=True, label="Refine Multiview Details", visible=True) # Habilitado
71
- expansion_weight = gr.Slider(minimum=-1., maximum=1.0, value=0.1, step=0.1, label="Expansion Weight", visible=True) # Habilitado
72
- init_type = gr.Dropdown(choices=["std", "thin"], label="Mesh Initialization", value="std", visible=True) # Habilitado
73
- setable_seed = gr.Slider(-1, 1000000000, -1, step=1, visible=True, label="Seed") # Habilitado
74
- render_video = gr.Checkbox(value=False, visible=True, label="Generate 360° Video") # Habilitado
75
- fullrunv2_btn = gr.Button('Generate 3D', variant="primary", interactive=True)
76
 
77
  fullrunv2_btn.click(
78
- fn=generate3dv2,
79
  inputs=[input_image, input_processing, setable_seed, render_video, do_refine, expansion_weight, init_type],
80
  outputs=[output_mesh, output_video],
81
  concurrency_id=concurrency_id,
 
8
  from gradio_app.custom_models.normal_prediction import predict_normals
9
  from scripts.refine_lr_to_sr import run_sr_fast
10
  from scripts.utils import save_glb_and_video
11
+ # from scripts.multiview_inference import geo_reconstruct
12
  from scripts.multiview_inference import geo_reconstruct_part1, geo_reconstruct_part2, geo_reconstruct_part3
13
 
14
  @spaces.GPU(duration=100)
 
59
 
60
 
61
  with gr.Column(scale=1):
62
+ # export mesh display
63
  output_mesh = gr.Model3D(value=None, label="Mesh Model", show_label=True, height=320, camera_position=(90, 90, 2))
64
+ output_video = gr.Video(label="Preview", show_label=True, show_share_button=True, height=320, visible=False)
65
 
66
  input_processing = gr.Checkbox(
67
  value=True,
68
  label='Remove Background',
69
  visible=True,
70
  )
71
+ do_refine = gr.Checkbox(value=True, label="Refine Multiview Details", visible=False)
72
+ expansion_weight = gr.Slider(minimum=-1., maximum=1.0, value=0.1, step=0.1, label="Expansion Weight", visible=False)
73
+ init_type = gr.Dropdown(choices=["std", "thin"], label="Mesh Initialization", value="std", visible=False)
74
+ setable_seed = gr.Slider(-1, 1000000000, -1, step=1, visible=True, label="Seed")
75
+ render_video = gr.Checkbox(value=False, visible=False, label="generate video")
76
+ fullrunv2_btn = gr.Button('Generate 3D', variant = "primary", interactive=True)
77
 
78
  fullrunv2_btn.click(
79
+ fn = generate3dv2,
80
  inputs=[input_image, input_processing, setable_seed, render_video, do_refine, expansion_weight, init_type],
81
  outputs=[output_mesh, output_video],
82
  concurrency_id=concurrency_id,