Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -141,7 +141,7 @@ def recognize_table(image):
|
|
141 |
# postprocess to get individual elements
|
142 |
id2label = structure_model.config.id2label
|
143 |
id2label[len(structure_model.config.id2label)] = "no object"
|
144 |
-
|
145 |
|
146 |
# visualize cells on cropped table
|
147 |
draw = ImageDraw.Draw(image)
|
|
|
141 |
# postprocess to get individual elements
|
142 |
id2label = structure_model.config.id2label
|
143 |
id2label[len(structure_model.config.id2label)] = "no object"
|
144 |
+
cells = outputs_to_objects(outputs, image.size, id2label)
|
145 |
|
146 |
# visualize cells on cropped table
|
147 |
draw = ImageDraw.Draw(image)
|