Commit
·
03ee8e0
1
Parent(s):
af8a1d5
Add example image
Browse files
gradio_demo/scaling_page.py
CHANGED
|
@@ -26,7 +26,12 @@ with gr.Blocks(title="Pixel-to-mm Scaling") as scaling_demo:
|
|
| 26 |
|
| 27 |
image_input = gr.ImageEditor(label="Upload and Crop Image", type="pil")
|
| 28 |
measure_btn = gr.Button(" Measure Width")
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
output_img = gr.Image(label="Cropped Result")
|
| 31 |
result_text = gr.Textbox(label="Width in Pixels")
|
| 32 |
|
|
|
|
| 26 |
|
| 27 |
image_input = gr.ImageEditor(label="Upload and Crop Image", type="pil")
|
| 28 |
measure_btn = gr.Button(" Measure Width")
|
| 29 |
+
gr.Examples(
|
| 30 |
+
examples=[["assets/example_reticule.png"]],
|
| 31 |
+
inputs=[image_input],
|
| 32 |
+
label="Try with Example",
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
output_img = gr.Image(label="Cropped Result")
|
| 36 |
result_text = gr.Textbox(label="Width in Pixels")
|
| 37 |
|