Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1267,7 +1267,7 @@ def create_pdf(cname,ename,account_number, directory):
|
|
| 1267 |
|
| 1268 |
},
|
| 1269 |
)
|
| 1270 |
-
output_file_name = f"{ename}_{cname}.pdf"
|
| 1271 |
document_created = True
|
| 1272 |
with open(output_file_name, "wb+") as output:
|
| 1273 |
output.write(filled.read())
|
|
@@ -1281,7 +1281,7 @@ def create_pdf(cname,ename,account_number, directory):
|
|
| 1281 |
|
| 1282 |
def zip_files_in_folder(directory, output_zip):
|
| 1283 |
# Initialize the ZIP file
|
| 1284 |
-
directory = "./"
|
| 1285 |
with zipfile.ZipFile(output_zip, 'w', zipfile.ZIP_DEFLATED) as zipf:
|
| 1286 |
# Walk through the directory and add PDF files to the ZIP
|
| 1287 |
for root, _, files in os.walk(directory):
|
|
|
|
| 1267 |
|
| 1268 |
},
|
| 1269 |
)
|
| 1270 |
+
output_file_name = f"./documents/{ename}_{cname}.pdf"
|
| 1271 |
document_created = True
|
| 1272 |
with open(output_file_name, "wb+") as output:
|
| 1273 |
output.write(filled.read())
|
|
|
|
| 1281 |
|
| 1282 |
def zip_files_in_folder(directory, output_zip):
|
| 1283 |
# Initialize the ZIP file
|
| 1284 |
+
directory = "./documents"
|
| 1285 |
with zipfile.ZipFile(output_zip, 'w', zipfile.ZIP_DEFLATED) as zipf:
|
| 1286 |
# Walk through the directory and add PDF files to the ZIP
|
| 1287 |
for root, _, files in os.walk(directory):
|