LouisLi commited on
Commit
713fc08
·
verified ·
1 Parent(s): 482e171

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -25,7 +25,6 @@ import tts
25
  ############# this part is for 3D generate #############
26
  ###############################################################################
27
 
28
- '''
29
 
30
  #import spaces
31
 
@@ -163,7 +162,7 @@ print('Loading Finished!')
163
  def check_input_image(input_image):
164
  if input_image is None:
165
  raise gr.Error("No image uploaded!")
166
- image= None
167
  else:
168
  image = Image.open(input_image)
169
  return image
@@ -273,7 +272,7 @@ def make3d(images):
273
  print(f"Mesh saved to {mesh_fpath}")
274
 
275
  return mesh_fpath, mesh_glb_fpath
276
- '''
277
 
278
  ###############################################################################
279
  ############# above part is for 3D generate #############
@@ -997,7 +996,7 @@ def create_ui():
997
  ###############################################################################
998
  # this part is for 3d generate.
999
  ###############################################################################
1000
- '''
1001
  with gr.Row(variant="panel"):
1002
  with gr.Column():
1003
  with gr.Row():
@@ -1086,9 +1085,9 @@ def create_ui():
1086
 
1087
  mv_images = gr.State()
1088
 
1089
- submit.click(fn=check_input_image, inputs=[new_crop_save_path], outputs=[process_images]).success(
1090
  fn=generate_mvs,
1091
- inputs=[process_images, sample_steps, sample_seed],
1092
  outputs=[mv_images, mv_show_images]
1093
 
1094
  ).success(
@@ -1096,7 +1095,7 @@ def create_ui():
1096
  inputs=[mv_images],
1097
  outputs=[output_model_obj, output_model_glb]
1098
  )
1099
- '''
1100
  ###############################################################################
1101
  # above part is for 3d generate.
1102
  ###############################################################################
 
25
  ############# this part is for 3D generate #############
26
  ###############################################################################
27
 
 
28
 
29
  #import spaces
30
 
 
162
  def check_input_image(input_image):
163
  if input_image is None:
164
  raise gr.Error("No image uploaded!")
165
+ image = None
166
  else:
167
  image = Image.open(input_image)
168
  return image
 
272
  print(f"Mesh saved to {mesh_fpath}")
273
 
274
  return mesh_fpath, mesh_glb_fpath
275
+
276
 
277
  ###############################################################################
278
  ############# above part is for 3D generate #############
 
996
  ###############################################################################
997
  # this part is for 3d generate.
998
  ###############################################################################
999
+
1000
  with gr.Row(variant="panel"):
1001
  with gr.Column():
1002
  with gr.Row():
 
1085
 
1086
  mv_images = gr.State()
1087
 
1088
+ submit.click(fn=check_input_image, inputs=[new_crop_save_path], outputs=[processed_image]).success(
1089
  fn=generate_mvs,
1090
+ inputs=[processed_image, sample_steps, sample_seed],
1091
  outputs=[mv_images, mv_show_images]
1092
 
1093
  ).success(
 
1095
  inputs=[mv_images],
1096
  outputs=[output_model_obj, output_model_glb]
1097
  )
1098
+
1099
  ###############################################################################
1100
  # above part is for 3d generate.
1101
  ###############################################################################