mp-02 commited on
Commit
f2fefda
1 Parent(s): 7dfc92a

Update inference.py

Browse files
Files changed (1) hide show
  1. 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