Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -316,19 +316,15 @@ with gr.Blocks(css=css) as demo:
|
|
316 |
image_in = gr.Image(label="Upload Image", type="numpy", height=512)
|
317 |
run_btn = gr.Button("Reconstruct Face", variant="primary")
|
318 |
|
319 |
-
status = gr.Textbox(label="Status", lines=6, interactive=True, value="Upload an image to start.")
|
320 |
-
|
321 |
-
|
322 |
-
with gr.Column():
|
323 |
-
mesh_file = gr.Model3D(label="3D Model Preview", height=512)
|
324 |
-
|
325 |
with gr.Row():
|
326 |
crop_img = gr.Image(label="Preprocessed", height=128)
|
327 |
normals_img = gr.Image(label="Normals", height=128)
|
328 |
uv_img = gr.Image(label="UV Map", height=128)
|
329 |
track_img = gr.Image(label="Tracking", height=128)
|
|
|
|
|
|
|
330 |
|
331 |
-
|
332 |
examples = gr.Examples(
|
333 |
examples=[
|
334 |
["example_images/jennifer_lawrence.png"],
|
@@ -336,11 +332,12 @@ with gr.Blocks(css=css) as demo:
|
|
336 |
["example_images/margaret_qualley.png"],
|
337 |
],
|
338 |
inputs=[image_in],
|
339 |
-
outputs=[
|
340 |
fn=generate_results_and_mesh,
|
341 |
cache_examples=True
|
342 |
)
|
343 |
-
|
|
|
344 |
|
345 |
run_btn.click(
|
346 |
fn=generate_results_and_mesh,
|
|
|
316 |
image_in = gr.Image(label="Upload Image", type="numpy", height=512)
|
317 |
run_btn = gr.Button("Reconstruct Face", variant="primary")
|
318 |
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
with gr.Row():
|
320 |
crop_img = gr.Image(label="Preprocessed", height=128)
|
321 |
normals_img = gr.Image(label="Normals", height=128)
|
322 |
uv_img = gr.Image(label="UV Map", height=128)
|
323 |
track_img = gr.Image(label="Tracking", height=128)
|
324 |
+
|
325 |
+
with gr.Column():
|
326 |
+
mesh_file = gr.Model3D(label="3D Model Preview", height=512)
|
327 |
|
|
|
328 |
examples = gr.Examples(
|
329 |
examples=[
|
330 |
["example_images/jennifer_lawrence.png"],
|
|
|
332 |
["example_images/margaret_qualley.png"],
|
333 |
],
|
334 |
inputs=[image_in],
|
335 |
+
outputs=[gr.State(), crop_img, normals_img, uv_img, track_img, mesh_file],
|
336 |
fn=generate_results_and_mesh,
|
337 |
cache_examples=True
|
338 |
)
|
339 |
+
status = gr.Textbox(label="Status", lines=5, interactive=True, value="Upload an image to start.")
|
340 |
+
|
341 |
|
342 |
run_btn.click(
|
343 |
fn=generate_results_and_mesh,
|