Spaces:
Running
Running
Update sroie_inference.py
Browse files- sroie_inference.py +3 -0
sroie_inference.py
CHANGED
@@ -76,6 +76,9 @@ def prediction(image):
|
|
76 |
|
77 |
d = {}
|
78 |
for id, i in enumerate(true_predictions):
|
|
|
|
|
|
|
79 |
if i not in d.keys():
|
80 |
d[i] = true_words[id]
|
81 |
else:
|
|
|
76 |
|
77 |
d = {}
|
78 |
for id, i in enumerate(true_predictions):
|
79 |
+
#rimuovo i prefissi
|
80 |
+
if i != "O":
|
81 |
+
i = i[2:]
|
82 |
if i not in d.keys():
|
83 |
d[i] = true_words[id]
|
84 |
else:
|