Spaces:
Sleeping
Sleeping
Update processor.py
Browse files- processor.py +1 -2
processor.py
CHANGED
@@ -163,8 +163,7 @@ def process_frame(frame, font_path, violation_image_path='violation.jpg'):
|
|
163 |
|
164 |
# Perform OCR
|
165 |
try:
|
166 |
-
|
167 |
-
license_plate_text = ocr_result[0]['generated_text'] if ocr_result else ""
|
168 |
except Exception as e:
|
169 |
print(f"OCR failed: {e}")
|
170 |
license_plate_text = ""
|
|
|
163 |
|
164 |
# Perform OCR
|
165 |
try:
|
166 |
+
license_plate_text = model_ocr.chat(processor, temp_image_path, ocr_type='ocr')
|
|
|
167 |
except Exception as e:
|
168 |
print(f"OCR failed: {e}")
|
169 |
license_plate_text = ""
|