Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -131,10 +131,10 @@ def inference(image_path, model_name, bbox_threshold):
|
|
| 131 |
tensor_img = tensor_img.unsqueeze(0)
|
| 132 |
|
| 133 |
|
| 134 |
-
|
| 135 |
if model_name == "RF-DETR-B":
|
| 136 |
model_path = "rfdetr.onnx"
|
| 137 |
-
|
| 138 |
model_path = "rfdetrl.onnx"
|
| 139 |
|
| 140 |
|
|
@@ -184,7 +184,7 @@ demo = gr.Interface(
|
|
| 184 |
fn=inference,
|
| 185 |
inputs=[
|
| 186 |
gr.Image(type="filepath", label="Input Image"),
|
| 187 |
-
gr.Dropdown(["RF-DETR-L"], value="RF-DETR-
|
| 188 |
gr.Slider(value=0.5, minimum=0.0, maximum=0.9, step=0.05, label="BBox threshold"),
|
| 189 |
],
|
| 190 |
outputs=gr.Gallery(label="Output", preview=True, height=500),
|
|
|
|
| 131 |
tensor_img = tensor_img.unsqueeze(0)
|
| 132 |
|
| 133 |
|
| 134 |
+
print(model_name)
|
| 135 |
if model_name == "RF-DETR-B":
|
| 136 |
model_path = "rfdetr.onnx"
|
| 137 |
+
if model_name == "RF-DETR-L":
|
| 138 |
model_path = "rfdetrl.onnx"
|
| 139 |
|
| 140 |
|
|
|
|
| 184 |
fn=inference,
|
| 185 |
inputs=[
|
| 186 |
gr.Image(type="filepath", label="Input Image"),
|
| 187 |
+
gr.Dropdown(["RF-DETR-L", "RF-DETR-B"], value="RF-DETR-B", label="Model"),
|
| 188 |
gr.Slider(value=0.5, minimum=0.0, maximum=0.9, step=0.05, label="BBox threshold"),
|
| 189 |
],
|
| 190 |
outputs=gr.Gallery(label="Output", preview=True, height=500),
|