Spaces:
Sleeping
Sleeping
Update cord_inference.py
Browse files- cord_inference.py +4 -0
cord_inference.py
CHANGED
@@ -55,6 +55,10 @@ def prediction(image):
|
|
55 |
true_words = true_words[1:-1]
|
56 |
true_confidence_scores = true_confidence_scores[1:-1]
|
57 |
|
|
|
|
|
|
|
|
|
58 |
d = {}
|
59 |
for id, i in enumerate(true_predictions):
|
60 |
if i not in d.keys():
|
|
|
55 |
true_words = true_words[1:-1]
|
56 |
true_confidence_scores = true_confidence_scores[1:-1]
|
57 |
|
58 |
+
for i, conf in enumerate(true_confidence_scores)
|
59 |
+
if conf < 0.85 :
|
60 |
+
true_predictions[i] = "O"
|
61 |
+
|
62 |
d = {}
|
63 |
for id, i in enumerate(true_predictions):
|
64 |
if i not in d.keys():
|