Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ matplotlib.use('Agg')
|
|
| 4 |
import streamlit as st
|
| 5 |
import cv2
|
| 6 |
import numpy as np
|
| 7 |
-
from yolov5 import YOLOv5
|
| 8 |
from sort.sort import Sort
|
| 9 |
import tempfile
|
| 10 |
import shutil
|
|
@@ -12,7 +12,7 @@ from moviepy.editor import VideoFileClip, concatenate_videoclips, ImageSequenceC
|
|
| 12 |
import os
|
| 13 |
|
| 14 |
# Load the pre-trained model and initialize the SORT tracker
|
| 15 |
-
model_path = '
|
| 16 |
model = YOLOv5(model_path, device='cpu')
|
| 17 |
tracker = Sort()
|
| 18 |
|
|
|
|
| 4 |
import streamlit as st
|
| 5 |
import cv2
|
| 6 |
import numpy as np
|
| 7 |
+
#from yolov5 import YOLOv5
|
| 8 |
from sort.sort import Sort
|
| 9 |
import tempfile
|
| 10 |
import shutil
|
|
|
|
| 12 |
import os
|
| 13 |
|
| 14 |
# Load the pre-trained model and initialize the SORT tracker
|
| 15 |
+
model_path = 'best.pt' # Ensure this path points to the model file
|
| 16 |
model = YOLOv5(model_path, device='cpu')
|
| 17 |
tracker = Sort()
|
| 18 |
|