Spaces:
Runtime error
Runtime error
cache examples
Browse files- .gitignore +2 -1
- app.py +5 -2
.gitignore
CHANGED
|
@@ -2,4 +2,5 @@ venv/
|
|
| 2 |
.DS_Store
|
| 3 |
out/
|
| 4 |
__pycache__/
|
| 5 |
-
*.pth
|
|
|
|
|
|
| 2 |
.DS_Store
|
| 3 |
out/
|
| 4 |
__pycache__/
|
| 5 |
+
*.pth
|
| 6 |
+
gradio_cached_examples/
|
app.py
CHANGED
|
@@ -94,6 +94,9 @@ with gr.Blocks() as blocks:
|
|
| 94 |
warped = gr.Image(label="Suggested Undo")
|
| 95 |
run_btn.click(fn=predict, inputs=[in_image], outputs=[
|
| 96 |
label, cropped, heatmap, warped])
|
| 97 |
-
gr.Examples(fn=predict,
|
| 98 |
-
|
|
|
|
|
|
|
|
|
|
| 99 |
blocks.launch()
|
|
|
|
| 94 |
warped = gr.Image(label="Suggested Undo")
|
| 95 |
run_btn.click(fn=predict, inputs=[in_image], outputs=[
|
| 96 |
label, cropped, heatmap, warped])
|
| 97 |
+
gr.Examples(fn=predict,
|
| 98 |
+
examples=list(Path("./examples").glob("*.png")),
|
| 99 |
+
inputs=[in_image],
|
| 100 |
+
outputs=[label, cropped, heatmap, warped],
|
| 101 |
+
cache_examples=True)
|
| 102 |
blocks.launch()
|