Spaces:
Runtime error
Runtime error
xinwei89
commited on
Commit
·
7f9e63f
1
Parent(s):
242850e
default gradio values
Browse files
app.py
CHANGED
@@ -3,11 +3,11 @@ from backend import visualize_image
|
|
3 |
|
4 |
# gradio inputs
|
5 |
image_input = gr.components.Image(type="pil", label="Input Image")
|
6 |
-
color_mode_select = gr.components.Radio(["Black/white", "Random", "Segmentation"], label="Color Mode")
|
7 |
-
mode_dropdown = gr.components.Dropdown(["Trees", "Buildings", "Both"], label="Detection Mode")
|
8 |
|
9 |
-
tree_threshold_slider = gr.components.Slider(minimum=0, maximum=1, step=0.1,
|
10 |
-
building_threshold_slider = gr.components.Slider(minimum=0, maximum=1, step=0.1,
|
11 |
|
12 |
# gradio outputs
|
13 |
output_image = gr.components.Image(type="pil", label="Output Image")
|
|
|
3 |
|
4 |
# gradio inputs
|
5 |
image_input = gr.components.Image(type="pil", label="Input Image")
|
6 |
+
color_mode_select = gr.components.Radio(choices=["Black/white", "Random", "Segmentation"], label="Color Mode", value="Segmentation")
|
7 |
+
mode_dropdown = gr.components.Dropdown(choices=["Trees", "Buildings", "Both"], label="Detection Mode", value="Both")
|
8 |
|
9 |
+
tree_threshold_slider = gr.components.Slider(minimum=0, maximum=1, step=0.1, value=0.7, label='Set confidence threshold "%" for trees')
|
10 |
+
building_threshold_slider = gr.components.Slider(minimum=0, maximum=1, step=0.1, value=0.7, label='Set confidence threshold "%" for buildings')
|
11 |
|
12 |
# gradio outputs
|
13 |
output_image = gr.components.Image(type="pil", label="Output Image")
|