Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,6 +44,15 @@ def execute_text_recognition_tflite( boxes, frame, interpreter, input_details, o
|
|
| 44 |
license_plate = text
|
| 45 |
text[:3].replace("0",'O')
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
return text,cv2.resize(save_frame,(94,24))
|
| 48 |
|
| 49 |
def greet(image):
|
|
|
|
| 44 |
license_plate = text
|
| 45 |
text[:3].replace("0",'O')
|
| 46 |
|
| 47 |
+
if len(text) > 7:
|
| 48 |
+
if len(text) >= 9:
|
| 49 |
+
text = text[1:8]
|
| 50 |
+
else :
|
| 51 |
+
if text[0].isdigit() :
|
| 52 |
+
text = text[1:]
|
| 53 |
+
else :
|
| 54 |
+
text = text[:7]
|
| 55 |
+
|
| 56 |
return text,cv2.resize(save_frame,(94,24))
|
| 57 |
|
| 58 |
def greet(image):
|