nielsr HF staff commited on
Commit
3a81b9e
1 Parent(s): 7bc6211

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -139,8 +139,8 @@ def recognize_table(image):
139
  outputs = structure_model(pixel_values)
140
 
141
  # postprocess to get individual elements
142
- id2label = structure_modelmodel.config.id2label
143
- id2label[len(structure_modelmodel.config.id2label)] = "no object"
144
  detected_tables = outputs_to_objects(outputs, image.size, id2label)
145
 
146
  # visualize cells on cropped table
 
139
  outputs = structure_model(pixel_values)
140
 
141
  # postprocess to get individual elements
142
+ id2label = structure_model.config.id2label
143
+ id2label[len(structure_model.config.id2label)] = "no object"
144
  detected_tables = outputs_to_objects(outputs, image.size, id2label)
145
 
146
  # visualize cells on cropped table