DatSplit commited on
Commit
075f8de
·
verified ·
1 Parent(s): c589de5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- else:
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-L", 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),
 
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),