Spaces:
Runtime error
Runtime error
Upload app.py for Gradio app
Browse files
app.py
CHANGED
|
@@ -5,9 +5,9 @@ import yaml
|
|
| 5 |
import os
|
| 6 |
import numpy as np
|
| 7 |
|
| 8 |
-
# Define paths using
|
| 9 |
-
model_weights_path = '
|
| 10 |
-
data_yaml_path = '
|
| 11 |
|
| 12 |
# Load the trained YOLOv8 model
|
| 13 |
model = YOLO(model_weights_path)
|
|
|
|
| 5 |
import os
|
| 6 |
import numpy as np
|
| 7 |
|
| 8 |
+
# Define paths using relative paths for Hugging Face Space deployment
|
| 9 |
+
model_weights_path = 'best.pt'
|
| 10 |
+
data_yaml_path = 'data.yaml'
|
| 11 |
|
| 12 |
# Load the trained YOLOv8 model
|
| 13 |
model = YOLO(model_weights_path)
|