faruqaziz commited on
Commit
1c48cfa
·
verified ·
1 Parent(s): 590b156

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -17,11 +17,8 @@ category_dict = {0: 'arborio', 1: 'basmati', 2: 'ipsala', 3: 'jasmine', 4: 'kara
17
 
18
  @spaces.GPU(duration=200)
19
  def yolov10_inference(image, model_id, image_size, conf_threshold, iou_threshold):
20
- rf = Roboflow(api_key="P03ZyTQgn7h7sH17vHoq")
21
- project = rf.workspace().project("rice-detection-lgqqs")
22
- model = project.version(2).model
23
- # model_path = download_models(model_id)
24
- # model = YOLOv10(model_path)
25
  results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
26
  detections = sv.Detections.from_ultralytics(results)
27
 
 
17
 
18
  @spaces.GPU(duration=200)
19
  def yolov10_inference(image, model_id, image_size, conf_threshold, iou_threshold):
20
+ model_path = download_models(model_id)
21
+ model = YOLOv10(model_path)
 
 
 
22
  results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
23
  detections = sv.Detections.from_ultralytics(results)
24