Spaces:
Runtime error
Runtime error
Zengyf-CVer
commited on
Commit
β’
65fff86
1
Parent(s):
c94471b
v03 update
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: π
|
|
4 |
colorFrom: purple
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.0.
|
8 |
app_file: app.py
|
9 |
pinned: true
|
10 |
license: gpl-3.0
|
|
|
4 |
colorFrom: purple
|
5 |
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.0.2
|
8 |
app_file: app.py
|
9 |
pinned: true
|
10 |
license: gpl-3.0
|
app.py
CHANGED
@@ -318,15 +318,15 @@ def main(args):
|
|
318 |
|
319 |
# ------------------- Input Components -------------------
|
320 |
inputs_img = gr.Image(image_mode="RGB", source=source, tool=img_tool, type="pil", label="original image")
|
321 |
-
inputs_device = gr.Radio(choices=["cuda:0", "cpu"],
|
322 |
-
inputs_model = gr.Dropdown(choices=model_names,
|
323 |
-
inputs_size = gr.Radio(choices=[320, 640, 1280],
|
324 |
-
input_conf = gr.Slider(0, 1, step=slider_step,
|
325 |
-
inputs_iou = gr.Slider(0, 1, step=slider_step,
|
326 |
-
inputs_maxnum = gr.Textbox(lines=1, placeholder="Maximum number of detections",
|
327 |
-
inputs_clsName = gr.CheckboxGroup(choices=model_cls_name,
|
328 |
inputs_opt = gr.CheckboxGroup(choices=["label", "pdf", "json"],
|
329 |
-
|
330 |
type="value",
|
331 |
label="operate")
|
332 |
|
|
|
318 |
|
319 |
# ------------------- Input Components -------------------
|
320 |
inputs_img = gr.Image(image_mode="RGB", source=source, tool=img_tool, type="pil", label="original image")
|
321 |
+
inputs_device = gr.Radio(choices=["cuda:0", "cpu"], value=device, label="device")
|
322 |
+
inputs_model = gr.Dropdown(choices=model_names, value=model_name, type="value", label="model")
|
323 |
+
inputs_size = gr.Radio(choices=[320, 640, 1280], value=inference_size, label="inference size")
|
324 |
+
input_conf = gr.Slider(0, 1, step=slider_step, value=nms_conf, label="confidence threshold")
|
325 |
+
inputs_iou = gr.Slider(0, 1, step=slider_step, value=nms_iou, label="IoU threshold")
|
326 |
+
inputs_maxnum = gr.Textbox(lines=1, placeholder="Maximum number of detections", value=max_detnum, label="Maximum number of detections")
|
327 |
+
inputs_clsName = gr.CheckboxGroup(choices=model_cls_name, value=model_cls_name, type="index", label="category")
|
328 |
inputs_opt = gr.CheckboxGroup(choices=["label", "pdf", "json"],
|
329 |
+
value=["label", "pdf"],
|
330 |
type="value",
|
331 |
label="operate")
|
332 |
|