Update app.py
Browse files
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 |
-
|
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):
|