Jin0908 commited on
Commit
c38d826
·
verified ·
1 Parent(s): 6ebe7b7

Upload app.py for Gradio app

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,9 +5,9 @@ import yaml
5
  import os
6
  import numpy as np
7
 
8
- # Define paths using the values from the Colab environment
9
- model_weights_path = 'runs\detect\yolov8n_custom\weights\best.pt'
10
- data_yaml_path = 'dataset2\data.yaml'
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)