Rename app.py to app_error2_2models.py
Browse files
app.py → app_error2_2models.py
RENAMED
|
@@ -278,8 +278,17 @@ def process_image(img):
|
|
| 278 |
plate_img = image.crop((x1, y1, x2, y2))
|
| 279 |
|
| 280 |
plate_text = read_plate(plate_img)
|
| 281 |
-
|
| 282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
|
| 284 |
discount = calculate_discounts(
|
| 285 |
vehicle_type,
|
|
|
|
| 278 |
plate_img = image.crop((x1, y1, x2, y2))
|
| 279 |
|
| 280 |
plate_text = read_plate(plate_img)
|
| 281 |
+
|
| 282 |
+
detected_vehicle, confidence = detect_vehicle_type(image)
|
| 283 |
+
|
| 284 |
+
plate_category = classify_plate_color(plate_img)
|
| 285 |
+
|
| 286 |
+
is_ev = (plate_category == "EV")
|
| 287 |
+
|
| 288 |
+
discount = calculate_discounts(
|
| 289 |
+
detected_vehicle,
|
| 290 |
+
is_ev
|
| 291 |
+
)
|
| 292 |
|
| 293 |
discount = calculate_discounts(
|
| 294 |
vehicle_type,
|