rosemariafontana commited on
Commit
63b47dd
Β·
verified Β·
1 Parent(s): 763a8d9

putting the noise back in

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -46,9 +46,10 @@ def parse_ticket_image(image):
46
 
47
  for idx, pred in enumerate(predictions):
48
  label = model.config.id2label[pred]
 
49
  # apparently stands for non-entity tokens
50
- if label != 'LABEL_0' and '<' not in words[idx]:
51
- extracted_fields.append((label, words[idx]))
52
 
53
  if len(extracted_fields) == 0:
54
  print(f"Warning - no fields were extracted!")
 
46
 
47
  for idx, pred in enumerate(predictions):
48
  label = model.config.id2label[pred]
49
+ extracted_fields.append((label, words[idx]))
50
  # apparently stands for non-entity tokens
51
+ #if label != 'LABEL_0' and '<' not in words[idx]:
52
+ # extracted_fields.append((label, words[idx]))
53
 
54
  if len(extracted_fields) == 0:
55
  print(f"Warning - no fields were extracted!")