Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,10 +5,13 @@ from PIL import Image, ImageDraw, ImageFont
|
|
5 |
from io import BytesIO
|
6 |
import json
|
7 |
import cv2
|
|
|
8 |
from ultralytics import YOLO
|
9 |
|
10 |
# ======================= МОДЕЛЬ ===================================
|
11 |
-
|
|
|
|
|
12 |
|
13 |
# ================== ЧТЕНИЕ НАЗВАНИЙ И ЦЕН =======================
|
14 |
# with open('Fruit_Veggies_Price.json', 'r', encoding='utf-8') as file:
|
|
|
5 |
from io import BytesIO
|
6 |
import json
|
7 |
import cv2
|
8 |
+
from pathlib import Path
|
9 |
from ultralytics import YOLO
|
10 |
|
11 |
# ======================= МОДЕЛЬ ===================================
|
12 |
+
model_name = "yolov11m_best.pt"
|
13 |
+
model_path = Path(__file__).with_name(model_name)
|
14 |
+
model = YOLO(model_path)
|
15 |
|
16 |
# ================== ЧТЕНИЕ НАЗВАНИЙ И ЦЕН =======================
|
17 |
# with open('Fruit_Veggies_Price.json', 'r', encoding='utf-8') as file:
|