melihuzunoglu commited on
Commit
1c31d03
·
verified ·
1 Parent(s): 6368bb7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -9
README.md CHANGED
@@ -14,17 +14,14 @@ You don't need to download the weights manually. You can load and run the model
14
 
15
  ```python
16
  from ultralytics import YOLO
 
 
17
 
18
- # 1. Load the model from Hugging Face
19
- model = YOLO("melihuzunoglu/human-fall-detection")
20
 
21
- # 2. Run inference on an image or video
22
- # Replace 'your_video.mp4' with your actual file path
23
- results = model.predict(source="your_video.mp4", conf=0.25, save=True)
24
-
25
- # 3. View results
26
- for result in results:
27
- result.show()
28
  ```
29
 
30
  ## ✅ Supported Classes (Labels)
 
14
 
15
  ```python
16
  from ultralytics import YOLO
17
+ from huggingface_hub import hf_hub_download
18
+ import os
19
 
20
+ model_path = hf_hub_download(repo_id="melihuzunoglu/human-fall-detection", filename="best.pt")
 
21
 
22
+ model = YOLO(model_path)
23
+
24
+ results = model.predict(source="image1.jpg", conf=0.25, save=True)
 
 
 
 
25
  ```
26
 
27
  ## ✅ Supported Classes (Labels)