yanranxiaoxi commited on
Commit
91e62ab
·
verified ·
1 Parent(s): 6163983

fix: shape in planes

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -226,7 +226,7 @@ def generate_mesh(image, source_size=512, render_size=384, mesh_size=512, export
226
 
227
  def step_1_generate_planes(image):
228
  planes_path = generate_mesh(image)
229
- return planes_path
230
 
231
  def step_2_generate_obj(image):
232
  mesh_path, _ = generate_mesh(image, export_mesh=True)
@@ -287,8 +287,8 @@ with gr.Blocks() as demo:
287
  """在加载新模型前重置 Gradio。"""
288
  return gr.update(value=None)
289
 
290
- # 首先清除输出的 3D 模型
291
- img_input.change(clear_model_viewer, inputs=None, outputs=model_output)
292
 
293
  # 然后生成模型和视频
294
  generate_planes_button.click(step_1_generate_planes, inputs=img_input, outputs=planes_output)
 
226
 
227
  def step_1_generate_planes(image):
228
  planes_path = generate_mesh(image)
229
+ return planes_path.shape
230
 
231
  def step_2_generate_obj(image):
232
  mesh_path, _ = generate_mesh(image, export_mesh=True)
 
287
  """在加载新模型前重置 Gradio。"""
288
  return gr.update(value=None)
289
 
290
+ # 首先清除输出的数据
291
+ img_input.change(clear_model_viewer, inputs=None, outputs=[planes_output, model_output])
292
 
293
  # 然后生成模型和视频
294
  generate_planes_button.click(step_1_generate_planes, inputs=img_input, outputs=planes_output)