Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,10 +4,6 @@ import numpy as np
|
|
4 |
from ultralytics import YOLO
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
|
7 |
-
model_file = hf_hub_download(repo_id="TheKnight115/Yolov8m", filename="yolov8_Medium.pt")
|
8 |
-
|
9 |
-
# Load the YOLO model
|
10 |
-
model = YOLO(model_file)
|
11 |
|
12 |
def run_yolo(image):
|
13 |
# Run the model on the image and get results
|
@@ -104,6 +100,11 @@ def process_video(uploaded_file):
|
|
104 |
st.download_button(label='Download Processed Video', data=video_bytes, file_name='processed_video.mp4', mime='video/mp4')
|
105 |
|
106 |
def main():
|
|
|
|
|
|
|
|
|
|
|
107 |
st.title("Motorbike Violation Detection")
|
108 |
|
109 |
# Upload file
|
|
|
4 |
from ultralytics import YOLO
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
|
|
|
|
|
|
|
|
|
7 |
|
8 |
def run_yolo(image):
|
9 |
# Run the model on the image and get results
|
|
|
100 |
st.download_button(label='Download Processed Video', data=video_bytes, file_name='processed_video.mp4', mime='video/mp4')
|
101 |
|
102 |
def main():
|
103 |
+
model_file = hf_hub_download(repo_id="TheKnight115/Yolov8m", filename="yolov8_Medium.pt")
|
104 |
+
|
105 |
+
# Load the YOLO model
|
106 |
+
model = YOLO(model_file)
|
107 |
+
|
108 |
st.title("Motorbike Violation Detection")
|
109 |
|
110 |
# Upload file
|