SERHANI commited on
Commit
3496472
·
verified ·
1 Parent(s): a3ce54c

Upload inference.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. inference.py +8 -0
inference.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+
2
+ from ultralytics import YOLO
3
+ import torch
4
+
5
+ def run_inference(image_path):
6
+ model = YOLO('model.pt')
7
+ results = model(image_path)
8
+ return results