ConiferousYogi commited on
Commit
db3f807
·
verified ·
1 Parent(s): 0c6b11a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -20,7 +20,7 @@ import supervision as sv
20
  from pyzbar.pyzbar import decode
21
  from pyaadhaar.utils import isSecureQr
22
  from pyaadhaar.decode import AadhaarSecureQr
23
-
24
  import firebase_admin
25
  from firebase_admin import credentials, firestore
26
  import json
@@ -149,16 +149,16 @@ except:
149
  print("Warning: YOLO model not loaded. Install ultralytics and download yolov8n.pt")
150
 
151
 
152
- # Loading the pre-trained YOLO Object Detection model
153
- try:
154
- OBJECT_DETECTION_MODEL_PATH = "./models/best.pt"
155
- object_detection_model = YOLO(OBJECT_DETECTION_MODEL_PATH)
156
- print("Object detection model loaded successfully.")
157
- print(f"Object Detection Model classes: {object_detection_model.names}")
158
- except Exception as e:
159
- object_detection_model = None
160
- print("Warning: YOLO model not loaded. Install ultralytics and download yolov8n.pt")
161
- print(f"Warning: Custom Object Detection model not loaded. Error: {e}")
162
 
163
  # Allowed file extensions
164
  ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'bmp'}
 
20
  from pyzbar.pyzbar import decode
21
  from pyaadhaar.utils import isSecureQr
22
  from pyaadhaar.decode import AadhaarSecureQr
23
+ import shutil
24
  import firebase_admin
25
  from firebase_admin import credentials, firestore
26
  import json
 
149
  print("Warning: YOLO model not loaded. Install ultralytics and download yolov8n.pt")
150
 
151
 
152
+ # # Loading the pre-trained YOLO Object Detection model
153
+ # try:
154
+ # OBJECT_DETECTION_MODEL_PATH = "./models/best.pt"
155
+ # object_detection_model = YOLO(OBJECT_DETECTION_MODEL_PATH)
156
+ # print("Object detection model loaded successfully.")
157
+ # print(f"Object Detection Model classes: {object_detection_model.names}")
158
+ # except Exception as e:
159
+ # object_detection_model = None
160
+ # print("Warning: YOLO model not loaded. Install ultralytics and download yolov8n.pt")
161
+ # print(f"Warning: Custom Object Detection model not loaded. Error: {e}")
162
 
163
  # Allowed file extensions
164
  ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'bmp'}