Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -62,9 +62,8 @@ def inference(image_path, model_name, bbox_threshold):
|
|
| 62 |
tensor_img, _ = transforms(image, None)
|
| 63 |
tensor_img = tensor_img.unsqueeze(0)
|
| 64 |
|
| 65 |
-
ort_inputs = {
|
| 66 |
-
|
| 67 |
-
}
|
| 68 |
if model_name == "RF-DETR-B":
|
| 69 |
model_path = "rfdetr.onnx"
|
| 70 |
else:
|
|
|
|
| 62 |
tensor_img, _ = transforms(image, None)
|
| 63 |
tensor_img = tensor_img.unsqueeze(0)
|
| 64 |
|
| 65 |
+
ort_inputs = {ort_session.get_inputs()[0].name: tensor_img.cpu().numpy()}
|
| 66 |
+
|
|
|
|
| 67 |
if model_name == "RF-DETR-B":
|
| 68 |
model_path = "rfdetr.onnx"
|
| 69 |
else:
|