Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -303,7 +303,7 @@ with gr.Blocks(css=css) as demo:
|
|
303 |
with gr.Row():
|
304 |
with gr.Column():
|
305 |
image_in = gr.Image(label="Upload Image", type="numpy", height=512)
|
306 |
-
run_btn = gr.Button("Reconstruct Face")
|
307 |
|
308 |
status = gr.Textbox(label="Status", lines=6, interactive=True, value="Upload an image to start.")
|
309 |
|
@@ -322,13 +322,13 @@ with gr.Blocks(css=css) as demo:
|
|
322 |
|
323 |
examples = gr.Examples(
|
324 |
examples=[
|
325 |
-
["example_images/jim_carrey.png",
|
326 |
-
["example_images/margaret_qualley.png",
|
327 |
],
|
328 |
inputs=[image_in, session_state],
|
329 |
-
outputs=[
|
330 |
fn=generate_results_and_mesh,
|
331 |
-
cache_examples=True
|
332 |
)
|
333 |
|
334 |
|
@@ -337,7 +337,6 @@ with gr.Blocks(css=css) as demo:
|
|
337 |
inputs=[image_in, session_state],
|
338 |
outputs=[status, crop_img, normals_img, uv_img, track_img, mesh_file]
|
339 |
)
|
340 |
-
examples.outputs = [status, crop_img, normals_img, uv_img, track_img, mesh_file]
|
341 |
image_in.upload(fn=reset_all, inputs=None, outputs=[crop_img, normals_img, uv_img, track_img, mesh_file, status, run_btn])
|
342 |
|
343 |
demo.unload(cleanup)
|
|
|
303 |
with gr.Row():
|
304 |
with gr.Column():
|
305 |
image_in = gr.Image(label="Upload Image", type="numpy", height=512)
|
306 |
+
run_btn = gr.Button("Reconstruct Face", variant="primary")
|
307 |
|
308 |
status = gr.Textbox(label="Status", lines=6, interactive=True, value="Upload an image to start.")
|
309 |
|
|
|
322 |
|
323 |
examples = gr.Examples(
|
324 |
examples=[
|
325 |
+
["example_images/jim_carrey.png", None],
|
326 |
+
["example_images/margaret_qualley.png", None],
|
327 |
],
|
328 |
inputs=[image_in, session_state],
|
329 |
+
outputs=[status, crop_img, normals_img, uv_img, track_img, mesh_file],
|
330 |
fn=generate_results_and_mesh,
|
331 |
+
cache_examples=True
|
332 |
)
|
333 |
|
334 |
|
|
|
337 |
inputs=[image_in, session_state],
|
338 |
outputs=[status, crop_img, normals_img, uv_img, track_img, mesh_file]
|
339 |
)
|
|
|
340 |
image_in.upload(fn=reset_all, inputs=None, outputs=[crop_img, normals_img, uv_img, track_img, mesh_file, status, run_btn])
|
341 |
|
342 |
demo.unload(cleanup)
|