Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -192,7 +192,7 @@ def process_video_and_save(uploaded_file):
|
|
192 |
# Perform OCR on the license plate
|
193 |
cv2.imwrite(violation_image_path, frame)
|
194 |
license_plate_pil = Image.fromarray(cv2.cvtColor(license_crop, cv2.COLOR_BGR2RGB))
|
195 |
-
temp_image_path = '
|
196 |
license_plate_pil.save(temp_image_path)
|
197 |
license_plate_text = model_ocr.chat(processor, temp_image_path, ocr_type='ocr')
|
198 |
filtered_text = filter_license_plate_text(license_plate_text)
|
|
|
192 |
# Perform OCR on the license plate
|
193 |
cv2.imwrite(violation_image_path, frame)
|
194 |
license_plate_pil = Image.fromarray(cv2.cvtColor(license_crop, cv2.COLOR_BGR2RGB))
|
195 |
+
temp_image_path = 'license_plate.png'
|
196 |
license_plate_pil.save(temp_image_path)
|
197 |
license_plate_text = model_ocr.chat(processor, temp_image_path, ocr_type='ocr')
|
198 |
filtered_text = filter_license_plate_text(license_plate_text)
|