mp-02 commited on
Commit
e3e9c8c
·
verified ·
1 Parent(s): fece6d1

Update cord_inference.py

Browse files
Files changed (1) hide show
  1. cord_inference.py +1 -1
cord_inference.py CHANGED
@@ -64,7 +64,7 @@ def prediction(image):
64
  else:
65
  d[i] = d[i] + ", " + true_words[id]
66
  d = {k: v.strip() for (k, v) in d.items()}
67
- d.pop("O")
68
 
69
  # TODO:process the json
70
 
 
64
  else:
65
  d[i] = d[i] + ", " + true_words[id]
66
  d = {k: v.strip() for (k, v) in d.items()}
67
+ if "O" in d: d.pop("O")
68
 
69
  # TODO:process the json
70