Sarvamangalak commited on
Commit
1bb19b1
·
verified ·
1 Parent(s): 1146153

Rename app.py to app_error2_2models.py

Browse files
Files changed (1) hide show
  1. app.py → app_error2_2models.py +11 -2
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
- vehicle_type = classify_plate_color(plate_img)
282
- is_ev = vehicle_type == "EV"
 
 
 
 
 
 
 
 
 
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,