mp-02 commited on
Commit
be761b5
1 Parent(s): 0a73d8f

Update sroie_inference.py

Browse files
Files changed (1) hide show
  1. sroie_inference.py +3 -3
sroie_inference.py CHANGED
@@ -70,9 +70,9 @@ def prediction(image):
70
  true_words = true_words[1:-1]
71
  true_confidence_scores = true_confidence_scores[1:-1]
72
 
73
- #for i, j in enumerate(true_confidence_scores):
74
- # if j < 0.8: #####################################
75
- # true_predictions[i] = "O"
76
 
77
  d = {}
78
  for id, i in enumerate(true_predictions):
 
70
  true_words = true_words[1:-1]
71
  true_confidence_scores = true_confidence_scores[1:-1]
72
 
73
+ for i, j in enumerate(true_confidence_scores):
74
+ if j < 0.5:
75
+ true_predictions[i] = "O"
76
 
77
  d = {}
78
  for id, i in enumerate(true_predictions):