Spaces:
Runtime error
Runtime error
napatswift
commited on
Commit
•
5dae5d6
1
Parent(s):
b1d2d4e
update dict
Browse files
app.py
CHANGED
@@ -17,98 +17,9 @@ prediction_model = keras.models.Model(
|
|
17 |
model.get_layer(name="image").input, model.get_layer(name="dense2").output
|
18 |
)
|
19 |
|
20 |
-
vocab = ['(',
|
21 |
-
'
|
22 |
-
'
|
23 |
-
'-',
|
24 |
-
'.',
|
25 |
-
'/',
|
26 |
-
'0',
|
27 |
-
'1',
|
28 |
-
'2',
|
29 |
-
'3',
|
30 |
-
'4',
|
31 |
-
'5',
|
32 |
-
'6',
|
33 |
-
'7',
|
34 |
-
'8',
|
35 |
-
'9',
|
36 |
-
':',
|
37 |
-
'=',
|
38 |
-
'ก',
|
39 |
-
'ข',
|
40 |
-
'ค',
|
41 |
-
'ฆ',
|
42 |
-
'ง',
|
43 |
-
'จ',
|
44 |
-
'ฉ',
|
45 |
-
'ช',
|
46 |
-
'ซ',
|
47 |
-
'ฌ',
|
48 |
-
'ญ',
|
49 |
-
'ฎ',
|
50 |
-
'ฏ',
|
51 |
-
'ฐ',
|
52 |
-
'ฑ',
|
53 |
-
'ฒ',
|
54 |
-
'ณ',
|
55 |
-
'ด',
|
56 |
-
'ต',
|
57 |
-
'ถ',
|
58 |
-
'ท',
|
59 |
-
'ธ',
|
60 |
-
'น',
|
61 |
-
'บ',
|
62 |
-
'ป',
|
63 |
-
'ผ',
|
64 |
-
'ฝ',
|
65 |
-
'พ',
|
66 |
-
'ฟ',
|
67 |
-
'ภ',
|
68 |
-
'ม',
|
69 |
-
'ย',
|
70 |
-
'ร',
|
71 |
-
'ฤ',
|
72 |
-
'ล',
|
73 |
-
'ว',
|
74 |
-
'ศ',
|
75 |
-
'ษ',
|
76 |
-
'ส',
|
77 |
-
'ห',
|
78 |
-
'ฬ',
|
79 |
-
'อ',
|
80 |
-
'ฮ',
|
81 |
-
'ะ',
|
82 |
-
'ั',
|
83 |
-
'า',
|
84 |
-
'ำ',
|
85 |
-
'ิ',
|
86 |
-
'ี',
|
87 |
-
'ึ',
|
88 |
-
'ื',
|
89 |
-
'ุ',
|
90 |
-
'ู',
|
91 |
-
'เ',
|
92 |
-
'แ',
|
93 |
-
'โ',
|
94 |
-
'ใ',
|
95 |
-
'ไ',
|
96 |
-
'็',
|
97 |
-
'่',
|
98 |
-
'้',
|
99 |
-
'๊',
|
100 |
-
'๋',
|
101 |
-
'์',
|
102 |
-
'๐',
|
103 |
-
'๑',
|
104 |
-
'๒',
|
105 |
-
'๓',
|
106 |
-
'๔',
|
107 |
-
'๕',
|
108 |
-
'๖',
|
109 |
-
'๗',
|
110 |
-
'๘',
|
111 |
-
'๙']
|
112 |
|
113 |
# Mapping integers back to original characters
|
114 |
num_to_char = layers.StringLookup(
|
|
|
17 |
model.get_layer(name="image").input, model.get_layer(name="dense2").output
|
18 |
)
|
19 |
|
20 |
+
vocab = [' ', '(', ')', '+', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', '=', '\xa0', 'ก', 'ข', 'ค', 'ฆ', 'ง', 'จ', 'ฉ', 'ช', 'ซ', 'ฌ', 'ญ',
|
21 |
+
'ฎ', 'ฏ', 'ฐ', 'ฑ', 'ฒ', 'ณ', 'ด', 'ต', 'ถ', 'ท', 'ธ', 'น', 'บ', 'ป', 'ผ', 'ฝ', 'พ', 'ฟ','ภ', 'ม', 'ย', 'ร', 'ฤ', 'ล', 'ฦ', 'ว', 'ศ', 'ษ', 'ส', 'ห', 'ฬ', 'อ', 'ฮ',
|
22 |
+
'ฯ', 'ะ', 'ั', 'า', 'ำ', 'ิ', 'ี', 'ึ', 'ื', 'ุ', 'ู', 'เ', 'แ', 'โ', 'ใ', 'ไ', 'ๅ', 'ๆ', '็', '่', '้', '๊', '๋', '์', '๐', '๑', '๒', '๓', '๔', '๕', '๖', '๗', '๘', '๙']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
# Mapping integers back to original characters
|
25 |
num_to_char = layers.StringLookup(
|