panda1835 commited on
Commit
2bbffd8
·
1 Parent(s): c691224

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,9 +4,11 @@ import gradio as gr
4
  import pandas as pd
5
  import torch
6
  import json
 
7
 
8
  # Load the model
9
- detect_model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt', force_reload=True, _verbose=False)
 
10
 
11
  def detect(image):
12
  # Inference
 
4
  import pandas as pd
5
  import torch
6
  import json
7
+ from ultralytics import YOLO
8
 
9
  # Load the model
10
+ # detect_model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt', force_reload=True, _verbose=False)
11
+ detect_model = YOLO('yolov8m_2023-10-23_best.pt')
12
 
13
  def detect(image):
14
  # Inference