Spaces:
Build error
Build error
Modify threshold
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ structure_class_thresholds = {
|
|
36 |
"table row": 0.5,
|
37 |
"table column header": 0.38,
|
38 |
"table projected row header": 0.27,
|
39 |
-
"table spanning cell": 0.
|
40 |
"no object": 10
|
41 |
}
|
42 |
|
@@ -252,7 +252,7 @@ def visualize_structure(pil_img, structure_result):
|
|
252 |
|
253 |
plt.axis('off')
|
254 |
img_buf = io.BytesIO()
|
255 |
-
plt.savefig(img_buf, bbox_inches='tight', dpi=
|
256 |
|
257 |
return PIL.Image.open(img_buf)
|
258 |
|
@@ -280,7 +280,7 @@ def visualize_cells(pil_img, cells):
|
|
280 |
|
281 |
plt.axis('off')
|
282 |
img_buf = io.BytesIO()
|
283 |
-
plt.savefig(img_buf, bbox_inches='tight', dpi=
|
284 |
|
285 |
return PIL.Image.open(img_buf)
|
286 |
|
|
|
36 |
"table row": 0.5,
|
37 |
"table column header": 0.38,
|
38 |
"table projected row header": 0.27,
|
39 |
+
"table spanning cell": 0.4,
|
40 |
"no object": 10
|
41 |
}
|
42 |
|
|
|
252 |
|
253 |
plt.axis('off')
|
254 |
img_buf = io.BytesIO()
|
255 |
+
plt.savefig(img_buf, bbox_inches='tight', dpi=1000)
|
256 |
|
257 |
return PIL.Image.open(img_buf)
|
258 |
|
|
|
280 |
|
281 |
plt.axis('off')
|
282 |
img_buf = io.BytesIO()
|
283 |
+
plt.savefig(img_buf, bbox_inches='tight', dpi=1000)
|
284 |
|
285 |
return PIL.Image.open(img_buf)
|
286 |
|