Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ os.makedirs(os.getenv('YOLO_CONFIG_DIR', '/app/.config/Ultralytics'), exist_ok=T
|
|
| 14 |
ANPR_WEIGHTS = "anpr_yolov8.pt"
|
| 15 |
if not os.path.exists(ANPR_WEIGHTS):
|
| 16 |
print(f"Downloading model weights to {ANPR_WEIGHTS}")
|
| 17 |
-
os.system(f"wget -O {ANPR_WEIGHTS} https://github.com/
|
| 18 |
|
| 19 |
# Load YOLO ANPR model with error handling
|
| 20 |
try:
|
|
@@ -60,4 +60,4 @@ demo = gr.Interface(
|
|
| 60 |
title="Automatic Number Plate Recognition (ANPR)",
|
| 61 |
description="Upload an image of a car to detect and read its license plate."
|
| 62 |
)
|
| 63 |
-
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 14 |
ANPR_WEIGHTS = "anpr_yolov8.pt"
|
| 15 |
if not os.path.exists(ANPR_WEIGHTS):
|
| 16 |
print(f"Downloading model weights to {ANPR_WEIGHTS}")
|
| 17 |
+
os.system(f"wget -O {ANPR_WEIGHTS} https://github.com/ultralytics/assets/releases/download/v8.2.0/yolov8n.pt")
|
| 18 |
|
| 19 |
# Load YOLO ANPR model with error handling
|
| 20 |
try:
|
|
|
|
| 60 |
title="Automatic Number Plate Recognition (ANPR)",
|
| 61 |
description="Upload an image of a car to detect and read its license plate."
|
| 62 |
)
|
| 63 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|