Spaces:
Runtime error
Runtime error
Commit
·
f403954
1
Parent(s):
d768dd3
Update app.py
Browse files
app.py
CHANGED
@@ -130,8 +130,8 @@ def generate_annotated_image(dataset_name, split, domain, category):
|
|
130 |
|
131 |
if len(msg_error) > 0:
|
132 |
# save
|
133 |
-
images_wo_content.save("img_paragraphs.png")
|
134 |
-
images_wo_content.save("img_lines.png")
|
135 |
df_paragraphs_wo_content.to_csv("paragraphs.csv", encoding="utf-8", index=False)
|
136 |
df_lines_wo_content.to_csv("lines.csv", encoding="utf-8", index=False)
|
137 |
return msg_error, images_wo_content, images_wo_content, "img_paragraphs.png", "img_lines.png", df_paragraphs_wo_content, df_lines_wo_content, gr.File.update(value="paragraphs.csv", visible=False), gr.File.update(value="lines.csv", visible=False)
|
|
|
130 |
|
131 |
if len(msg_error) > 0:
|
132 |
# save
|
133 |
+
Image.open(images_wo_content).save("img_paragraphs.png")
|
134 |
+
Image.open(images_wo_content).save("img_lines.png")
|
135 |
df_paragraphs_wo_content.to_csv("paragraphs.csv", encoding="utf-8", index=False)
|
136 |
df_lines_wo_content.to_csv("lines.csv", encoding="utf-8", index=False)
|
137 |
return msg_error, images_wo_content, images_wo_content, "img_paragraphs.png", "img_lines.png", df_paragraphs_wo_content, df_lines_wo_content, gr.File.update(value="paragraphs.csv", visible=False), gr.File.update(value="lines.csv", visible=False)
|