Spaces:
Build error
Build error
Upload gradio_app.py with huggingface_hub
Browse files- gradio_app.py +4 -8
gradio_app.py
CHANGED
@@ -144,12 +144,6 @@ with gr.Blocks() as demo:
|
|
144 |
height=300,
|
145 |
)
|
146 |
with gr.Column():
|
147 |
-
gr.Radio(
|
148 |
-
choices=["Scale | Shift Invariant", "Metric (TODO)"],
|
149 |
-
label="Depth Type",
|
150 |
-
value="Scale | Shift Invariant",
|
151 |
-
interactive=True,
|
152 |
-
)
|
153 |
with gr.Row():
|
154 |
remove_flying_pixels = gr.Checkbox(
|
155 |
label="Remove Flying Pixels",
|
@@ -157,7 +151,7 @@ with gr.Blocks() as demo:
|
|
157 |
interactive=True,
|
158 |
)
|
159 |
depth_map_threshold = gr.Slider(
|
160 |
-
label="
|
161 |
minimum=0.05,
|
162 |
maximum=0.95,
|
163 |
step=0.05,
|
@@ -197,8 +191,10 @@ with gr.Blocks() as demo:
|
|
197 |
outputs=[model_status],
|
198 |
)
|
199 |
|
|
|
200 |
examples_paths = Path("examples").glob("*.jpeg")
|
201 |
-
|
|
|
202 |
examples = gr.Examples(
|
203 |
examples=examples_list,
|
204 |
inputs=[input_image, remove_flying_pixels, depth_map_threshold],
|
|
|
144 |
height=300,
|
145 |
)
|
146 |
with gr.Column():
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
with gr.Row():
|
148 |
remove_flying_pixels = gr.Checkbox(
|
149 |
label="Remove Flying Pixels",
|
|
|
151 |
interactive=True,
|
152 |
)
|
153 |
depth_map_threshold = gr.Slider(
|
154 |
+
label="⬇️ number == more pruning ⬆️ less pruning",
|
155 |
minimum=0.05,
|
156 |
maximum=0.95,
|
157 |
step=0.05,
|
|
|
191 |
outputs=[model_status],
|
192 |
)
|
193 |
|
194 |
+
# get all jpegs in examples path
|
195 |
examples_paths = Path("examples").glob("*.jpeg")
|
196 |
+
# set the examples to be the sorted list of input parameterss (path, remove_flying_pixels, depth_map_threshold)
|
197 |
+
examples_list = sorted([[str(path), True, 0.1] for path in examples_paths])
|
198 |
examples = gr.Examples(
|
199 |
examples=examples_list,
|
200 |
inputs=[input_image, remove_flying_pixels, depth_map_threshold],
|