Spaces:
Paused
Paused
examples added
Browse files
app.py
CHANGED
|
@@ -262,6 +262,15 @@ with demo:
|
|
| 262 |
uv_img = gr.Image(label="UV Map", height=256)
|
| 263 |
track_img = gr.Image(label="Tracking", height=256)
|
| 264 |
mesh_file = gr.File(label="Download Mesh (.ply)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
run_btn = gr.Button("Run Pipeline")
|
| 266 |
|
| 267 |
run_btn.click(
|
|
@@ -269,7 +278,7 @@ with demo:
|
|
| 269 |
inputs=[image_in, state],
|
| 270 |
outputs=[status, crop_img, normals_img, uv_img, track_img, mesh_file, state]
|
| 271 |
)
|
| 272 |
-
|
| 273 |
image_in.upload(fn=reset_all, inputs=None, outputs=[crop_img, normals_img, uv_img, track_img, mesh_file, status, state, run_btn])
|
| 274 |
|
| 275 |
demo.unload(fn=cleanup, inputs=[state], outputs=[])
|
|
|
|
| 262 |
uv_img = gr.Image(label="UV Map", height=256)
|
| 263 |
track_img = gr.Image(label="Tracking", height=256)
|
| 264 |
mesh_file = gr.File(label="Download Mesh (.ply)")
|
| 265 |
+
|
| 266 |
+
examples = gr.Examples(
|
| 267 |
+
examples=["example_images/jim_carrey.png", "example_images/margaret_qualley.png"],
|
| 268 |
+
inputs=image_in,
|
| 269 |
+
outputs=[], # outputs are specified via the callback
|
| 270 |
+
fn=run_pipeline,
|
| 271 |
+
cache_examples=True # cache results of examples for faster loading
|
| 272 |
+
)
|
| 273 |
+
|
| 274 |
run_btn = gr.Button("Run Pipeline")
|
| 275 |
|
| 276 |
run_btn.click(
|
|
|
|
| 278 |
inputs=[image_in, state],
|
| 279 |
outputs=[status, crop_img, normals_img, uv_img, track_img, mesh_file, state]
|
| 280 |
)
|
| 281 |
+
examples.outputs = [status, crop_img, normals_img, uv_img, track_img, mesh_file, state]
|
| 282 |
image_in.upload(fn=reset_all, inputs=None, outputs=[crop_img, normals_img, uv_img, track_img, mesh_file, status, state, run_btn])
|
| 283 |
|
| 284 |
demo.unload(fn=cleanup, inputs=[state], outputs=[])
|