brjathu commited on
Commit
bb8a425
·
1 Parent(s): f88ff7a
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -134,9 +134,9 @@ def infer(in_pil_img, in_threshold=0.8, out_pil_img=None):
134
  # convert to PIL image
135
  out_pil_img = Image.fromarray((input_img_overlay*255).astype(np.uint8))
136
 
137
- return out_pil_img, all_mesh_paths
138
  else:
139
- return None, []
140
 
141
 
142
  with gr.Blocks(title="4DHumans", css=".gradio-container") as demo:
@@ -148,14 +148,14 @@ with gr.Blocks(title="4DHumans", css=".gradio-container") as demo:
148
  input_image = gr.Image(label="Input image", type="pil")
149
  with gr.Column():
150
  output_image = gr.Image(label="Reconstructions", type="pil")
151
- output_meshes = gr.File(label="3D meshes")
152
 
153
  gr.HTML("""<br/>""")
154
 
155
  with gr.Row():
156
  threshold = gr.Slider(0, 1.0, value=0.6, label='Detection Threshold')
157
  send_btn = gr.Button("Infer")
158
- send_btn.click(fn=infer, inputs=[input_image, threshold], outputs=[output_image, output_meshes])
159
 
160
  # gr.Examples([
161
  # ['assets/test1.png', 0.6],
 
134
  # convert to PIL image
135
  out_pil_img = Image.fromarray((input_img_overlay*255).astype(np.uint8))
136
 
137
+ return out_pil_img
138
  else:
139
+ return None
140
 
141
 
142
  with gr.Blocks(title="4DHumans", css=".gradio-container") as demo:
 
148
  input_image = gr.Image(label="Input image", type="pil")
149
  with gr.Column():
150
  output_image = gr.Image(label="Reconstructions", type="pil")
151
+ # output_meshes = gr.File(label="3D meshes")
152
 
153
  gr.HTML("""<br/>""")
154
 
155
  with gr.Row():
156
  threshold = gr.Slider(0, 1.0, value=0.6, label='Detection Threshold')
157
  send_btn = gr.Button("Infer")
158
+ send_btn.click(fn=infer, inputs=[input_image, threshold], outputs=[output_image])
159
 
160
  # gr.Examples([
161
  # ['assets/test1.png', 0.6],