leakyrelu commited on
Commit
aa4b6db
1 Parent(s): 778c295

add decoding dict

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -1,6 +1,11 @@
1
  import gradio as gr
2
  import re, datetime,time, cv2, numpy as np, tensorflow as tf, sys
3
 
 
 
 
 
 
4
  interpreter = tf.lite.Interpreter(model_path='detection.tflite')
5
  interpreter.allocate_tensors()
6
  recog_interpreter = tf.lite.Interpreter(model_path='recognition.tflite')
 
1
  import gradio as gr
2
  import re, datetime,time, cv2, numpy as np, tensorflow as tf, sys
3
 
4
+
5
+ CHARS = "ABCDEFGHIJKLMNPQRSTUVWXYZ0123456789" # exclude I, O
6
+ CHARS_DICT = {char:i for i, char in enumerate(CHARS)}
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='recognition.tflite')