pierreguillou
commited on
Commit
·
66a06a0
1
Parent(s):
104001c
Update app.py
Browse files
app.py
CHANGED
@@ -72,6 +72,7 @@ def app_outputs(uploaded_pdf):
|
|
72 |
for i in range(num_images):
|
73 |
if filename != "files/blank.png": img_file = f"img_{i}_" + filename.replace(".pdf", ".png")
|
74 |
else: img_file = filename.replace(".pdf", ".png")
|
|
|
75 |
labeled_images[i].save(img_file)
|
76 |
img_files.append(img_file)
|
77 |
|
@@ -117,6 +118,7 @@ def app_outputs(uploaded_pdf):
|
|
117 |
csv_files = list()
|
118 |
for i in range(max_imgboxes):
|
119 |
csv_file = f"csv_{i}_" + filename.replace(".pdf", ".csv")
|
|
|
120 |
csv_files.append(gr.File.update(value=csv_file, visible=True))
|
121 |
df[i].to_csv(csv_file, encoding="utf-8", index=False)
|
122 |
|
|
|
72 |
for i in range(num_images):
|
73 |
if filename != "files/blank.png": img_file = f"img_{i}_" + filename.replace(".pdf", ".png")
|
74 |
else: img_file = filename.replace(".pdf", ".png")
|
75 |
+
img_file = img_file.replace("/", "_")
|
76 |
labeled_images[i].save(img_file)
|
77 |
img_files.append(img_file)
|
78 |
|
|
|
118 |
csv_files = list()
|
119 |
for i in range(max_imgboxes):
|
120 |
csv_file = f"csv_{i}_" + filename.replace(".pdf", ".csv")
|
121 |
+
csv_file = csv_file.replace("/", "_")
|
122 |
csv_files.append(gr.File.update(value=csv_file, visible=True))
|
123 |
df[i].to_csv(csv_file, encoding="utf-8", index=False)
|
124 |
|