Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,8 +46,8 @@ def attempt_download_from_hub(repo_id, hf_token=None):
|
|
46 |
|
47 |
@spaces.GPU(duration=200)
|
48 |
def LeYOLO_inference(image, model_id, image_size, conf_threshold, iou_threshold):
|
49 |
-
MODEL_PATH = attempt_download_from_hub(
|
50 |
-
model = model = YOLO(
|
51 |
results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
|
52 |
detections = sv.Detections.from_ultralytics(results)
|
53 |
|
|
|
46 |
|
47 |
@spaces.GPU(duration=200)
|
48 |
def LeYOLO_inference(image, model_id, image_size, conf_threshold, iou_threshold):
|
49 |
+
MODEL_PATH = attempt_download_from_hub(model_id)
|
50 |
+
model = model = YOLO(MODEL_PATH)
|
51 |
results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
|
52 |
detections = sv.Detections.from_ultralytics(results)
|
53 |
|