mkhug98 commited on
Commit
453592e
·
verified ·
1 Parent(s): 885ba35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -1,12 +1,9 @@
1
  import gradio as gr
2
  from huggingface_hub import hf_hub_download
3
  import torch
 
4
 
5
- # Download the YOLOv5 model from Hugging Face
6
- model_path = hf_hub_download(repo_id="mkhug98/EchoYolo", filename="best.onnx")
7
-
8
- # Load the YOLOv5 model
9
- model = torch.hub.load('ultralytics/yolov5', 'custom', path=model_path)
10
 
11
  # Function to perform object detection
12
  def detect_objects(image):
 
1
  import gradio as gr
2
  from huggingface_hub import hf_hub_download
3
  import torch
4
+ from ultralytics import YOLO
5
 
6
+ model = YOLO("best.onnx")
 
 
 
 
7
 
8
  # Function to perform object detection
9
  def detect_objects(image):