- app.py +5 -1
- requirements.txt +1 -0
app.py
CHANGED
@@ -5,7 +5,11 @@ sys.path.append('./utils')
|
|
5 |
from yolo_utils import preprocess_image_pil, run_model, process_results, plot_results_gradio
|
6 |
import matplotlib.pyplot as plt
|
7 |
import io
|
8 |
-
|
|
|
|
|
|
|
|
|
9 |
|
10 |
def process_image(image,conf,iou):
|
11 |
model = YOLO('./trained_models/nano.pt')
|
|
|
5 |
from yolo_utils import preprocess_image_pil, run_model, process_results, plot_results_gradio
|
6 |
import matplotlib.pyplot as plt
|
7 |
import io
|
8 |
+
try:
|
9 |
+
from ultralytics import YOLO
|
10 |
+
except ImportError:
|
11 |
+
os.system('pip install -e ./yolov8-to')
|
12 |
+
from ultralytics import YOLO
|
13 |
|
14 |
def process_image(image,conf,iou):
|
15 |
model = YOLO('./trained_models/nano.pt')
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
torch
|