Spaces:
Sleeping
Sleeping
Update inference.py
Browse files- inference.py +4 -0
inference.py
CHANGED
@@ -53,6 +53,10 @@ def prediction(image):
|
|
53 |
true_words = true_words[1:-1]
|
54 |
true_confidence_scores = true_confidence_scores[1:-1]
|
55 |
|
|
|
|
|
|
|
|
|
56 |
d = {}
|
57 |
for id, i in enumerate(true_predictions):
|
58 |
#rimuovo i prefissi
|
|
|
53 |
true_words = true_words[1:-1]
|
54 |
true_confidence_scores = true_confidence_scores[1:-1]
|
55 |
|
56 |
+
for i, j in enumerate(true_confidence_scores):
|
57 |
+
if j < 0.5:
|
58 |
+
true_predictions[i] = "O"
|
59 |
+
|
60 |
d = {}
|
61 |
for id, i in enumerate(true_predictions):
|
62 |
#rimuovo i prefissi
|