Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ DECODE_DICT = {i:char for i, char in enumerate(CHARS)}
|
|
8 |
|
9 |
interpreter = tf.lite.Interpreter(model_path='detection.tflite')
|
10 |
interpreter.allocate_tensors()
|
11 |
-
recog_interpreter = tf.lite.Interpreter(model_path='
|
12 |
recog_input_details = recog_interpreter.get_input_details()
|
13 |
recog_output_details = recog_interpreter.get_output_details()
|
14 |
recog_interpreter.resize_tensor_input(recog_input_details[0]['index'], (1, 24, 94, 3))
|
@@ -62,7 +62,7 @@ def greet(image):
|
|
62 |
text = None
|
63 |
# For index and confidence value of the first class [0]
|
64 |
for i, confidence in enumerate(output_data[0]):
|
65 |
-
if confidence > .
|
66 |
text, crop = execute_text_recognition_tflite(
|
67 |
boxes[0][i], image,
|
68 |
recog_interpreter, recog_input_details, recog_output_details,
|
|
|
8 |
|
9 |
interpreter = tf.lite.Interpreter(model_path='detection.tflite')
|
10 |
interpreter.allocate_tensors()
|
11 |
+
recog_interpreter = tf.lite.Interpreter(model_path='recognition.tflite')
|
12 |
recog_input_details = recog_interpreter.get_input_details()
|
13 |
recog_output_details = recog_interpreter.get_output_details()
|
14 |
recog_interpreter.resize_tensor_input(recog_input_details[0]['index'], (1, 24, 94, 3))
|
|
|
62 |
text = None
|
63 |
# For index and confidence value of the first class [0]
|
64 |
for i, confidence in enumerate(output_data[0]):
|
65 |
+
if confidence > .1:
|
66 |
text, crop = execute_text_recognition_tflite(
|
67 |
boxes[0][i], image,
|
68 |
recog_interpreter, recog_input_details, recog_output_details,
|