nagasurendra commited on
Commit
e6b6213
·
verified ·
1 Parent(s): e15561f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,14 +3,14 @@ import torch
3
  from ultralytics import YOLO
4
  import gradio as gr
5
 
6
- # Load the pre-trained YOLO model (assuming 'best.pt' is a YOLOv5 model)
7
- model = YOLO("./data/best.pt")
8
 
9
  # Function to process video frames and count wine bottles
10
  def process_frame(frame):
11
  # Perform inference on the frame
12
  results = model(frame)
13
-
14
  # Extract results
15
  detections = results.pandas().xywh[results.pandas().xywh['class'] == 0] # Assuming '0' is the class for wine bottles
16
 
 
3
  from ultralytics import YOLO
4
  import gradio as gr
5
 
6
+ # Load the pre-trained YOLOv8 model
7
+ model = YOLO("./data/best.pt") # Replace with path to your trained YOLOv8 model
8
 
9
  # Function to process video frames and count wine bottles
10
  def process_frame(frame):
11
  # Perform inference on the frame
12
  results = model(frame)
13
+
14
  # Extract results
15
  detections = results.pandas().xywh[results.pandas().xywh['class'] == 0] # Assuming '0' is the class for wine bottles
16