Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,11 @@ import gradio as gr
|
|
2 |
import torch
|
3 |
from PIL import Image
|
4 |
import requests
|
|
|
|
|
5 |
|
6 |
# Load the trained YOLOv8 model
|
7 |
-
model =
|
8 |
|
9 |
def detect_objects(image):
|
10 |
# Run the YOLOv8 model on the input image
|
|
|
2 |
import torch
|
3 |
from PIL import Image
|
4 |
import requests
|
5 |
+
from ultralytics import YOLO
|
6 |
+
|
7 |
|
8 |
# Load the trained YOLOv8 model
|
9 |
+
model = YOLO("./my_yolov8_model/best.pt")
|
10 |
|
11 |
def detect_objects(image):
|
12 |
# Run the YOLOv8 model on the input image
|