mennamostafa55555 commited on
Commit
dc6ee64
·
1 Parent(s): f9b7b0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -4,17 +4,18 @@ from ultralytics import YOLO
4
  import sahi
5
 
6
 
 
7
  # Images
8
  sahi.utils.file.download_from_url(
9
- "https://huggingface.co/spaces/devisionx/Sixth_Demo/blob/main/jWeN8.png",
10
  "t1.jpg",
11
  )
12
  sahi.utils.file.download_from_url(
13
- "https://sources.roboflow.com/i4FKV5acvhPPX6jb5fqVRBP900D3/2YXu1JnXnQZ5tyaj92RX/thumb.jpg",
14
  "t2.jpg",
15
  )
16
  sahi.utils.file.download_from_url(
17
- "https://transform.roboflow.com/i4FKV5acvhPPX6jb5fqVRBP900D3/e11b147e2f547b8265eb8731299673f7/thumb.jpg",
18
  "t3.jpg",
19
  )
20
 
@@ -34,7 +35,7 @@ def yolov8_inference(
34
  ):
35
 
36
 
37
- model = YOLO("https://huggingface.co/spaces/devisionx/sixth_model/blob/main/bestt_weight.pt")
38
 
39
  results = model(image,conf=conf_threshold,iou=iou_threshold ,imgsz=320)[0]
40
  detections = sv.Detections.from_yolov8(results)
 
4
  import sahi
5
 
6
 
7
+
8
  # Images
9
  sahi.utils.file.download_from_url(
10
+ "https://sources.roboflow.com/i4FKV5acvhPPX6jb5fqVRBP900D3/2YXu1JnXnQZ5tyaj92RX/thumb.jpg",
11
  "t1.jpg",
12
  )
13
  sahi.utils.file.download_from_url(
14
+ "https://sources.roboflow.com/i4FKV5acvhPPX6jb5fqVRBP900D3/4g41sAlAHI3BDjhKdzqm/thumb.jpg",
15
  "t2.jpg",
16
  )
17
  sahi.utils.file.download_from_url(
18
+ "https://sources.roboflow.com/i4FKV5acvhPPX6jb5fqVRBP900D3/8rAVHhqu5JaN93VhULpr/thumb.jpg",
19
  "t3.jpg",
20
  )
21
 
 
35
  ):
36
 
37
 
38
+ model = YOLO("/content/segment/train/weights/best.pt")
39
 
40
  results = model(image,conf=conf_threshold,iou=iou_threshold ,imgsz=320)[0]
41
  detections = sv.Detections.from_yolov8(results)