Spaces:
Build error
Build error
Mnjar
commited on
Commit
·
4eac3e0
1
Parent(s):
b953c12
Fix model path app.py
Browse files
app.py
CHANGED
|
@@ -3,14 +3,9 @@ import numpy as np
|
|
| 3 |
import pandas as pd
|
| 4 |
from PIL import Image, ImageDraw, ImageFont
|
| 5 |
from ultralytics import YOLO
|
| 6 |
-
from huggingface_hub import hf_hub_download
|
| 7 |
-
from ultralytics import YOLO
|
| 8 |
-
|
| 9 |
-
# Download model dari Hugging Face
|
| 10 |
-
model_path = hf_hub_download(repo_id="Mnjar/TrashDetection", filename="trash_detection.pt")
|
| 11 |
|
| 12 |
# Load YOLO model
|
| 13 |
-
model = YOLO(
|
| 14 |
|
| 15 |
def predict(image):
|
| 16 |
"""
|
|
|
|
| 3 |
import pandas as pd
|
| 4 |
from PIL import Image, ImageDraw, ImageFont
|
| 5 |
from ultralytics import YOLO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# Load YOLO model
|
| 8 |
+
model = YOLO('trash_detection.pt')
|
| 9 |
|
| 10 |
def predict(image):
|
| 11 |
"""
|