Spaces:
Running
Running
Update cord_inference.py
Browse files- cord_inference.py +3 -1
cord_inference.py
CHANGED
@@ -54,11 +54,13 @@ def prediction(image):
|
|
54 |
true_confidence_scores = true_confidence_scores[1:-1]
|
55 |
|
56 |
for i, conf in enumerate(true_confidence_scores):
|
57 |
-
if conf < 0.
|
58 |
true_predictions[i] = "O"
|
59 |
|
60 |
d = {}
|
61 |
for id, i in enumerate(true_predictions):
|
|
|
|
|
62 |
if i not in d.keys():
|
63 |
d[i] = true_words[id]
|
64 |
else:
|
|
|
54 |
true_confidence_scores = true_confidence_scores[1:-1]
|
55 |
|
56 |
for i, conf in enumerate(true_confidence_scores):
|
57 |
+
if conf < 0.5 :
|
58 |
true_predictions[i] = "O"
|
59 |
|
60 |
d = {}
|
61 |
for id, i in enumerate(true_predictions):
|
62 |
+
if i != "O":
|
63 |
+
i = i[2:]
|
64 |
if i not in d.keys():
|
65 |
d[i] = true_words[id]
|
66 |
else:
|