wookimchye commited on
Commit
7ee369c
·
verified ·
1 Parent(s): f2cd80e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -7,6 +7,8 @@ import os
7
 
8
  model_path = "best_int8_openvino_model"
9
 
 
 
10
  # Example paths for Gradio
11
  image_examples = [["DurianMangosteen1.jpg"], ["DurianMangosteen2.jpg"]]
12
 
@@ -17,7 +19,8 @@ def load_model(repo_id):
17
  #path = os.path.join(download_dir, "best_int8_openvino_model") # path to the model
18
  #print(path)
19
  #detection_model = YOLO(path, task='detect') # load the model
20
- detection_model = YOLO(download_dir, task='detect') # load the model
 
21
  return detection_model
22
 
23
  # Predict the image
 
7
 
8
  model_path = "best_int8_openvino_model"
9
 
10
+ best_yolo_model = "best.pt" # Trained YOLOv8 detection model
11
+
12
  # Example paths for Gradio
13
  image_examples = [["DurianMangosteen1.jpg"], ["DurianMangosteen2.jpg"]]
14
 
 
19
  #path = os.path.join(download_dir, "best_int8_openvino_model") # path to the model
20
  #print(path)
21
  #detection_model = YOLO(path, task='detect') # load the model
22
+
23
+ detection_model = YOLO(best_yolo_model, task='detect')# load the model
24
  return detection_model
25
 
26
  # Predict the image