Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1213,7 +1213,7 @@ def handle_large_dataset(df, create_document,isDataFrame):
|
|
1213 |
# Directory containing PDF files
|
1214 |
pdf_dir = "/home/user/app"
|
1215 |
# Output ZIP file name
|
1216 |
-
zip_file_name = "
|
1217 |
print(zip_file_name)
|
1218 |
zip_files_in_folder(directory, zip_file_name)
|
1219 |
create_file_HF(zip_file_name,directory, False)
|
@@ -1289,7 +1289,7 @@ def zip_files_in_folder(directory, output_zip):
|
|
1289 |
if file.endswith(".pdf"): # Only include PDF files
|
1290 |
file_path = os.path.join(root, file)
|
1291 |
# Add file to the ZIP archive
|
1292 |
-
zipf.write(file_path,
|
1293 |
print(f"ZIP file created: {output_zip}")
|
1294 |
|
1295 |
def directory_exists(repo_id, directory, token):
|
|
|
1213 |
# Directory containing PDF files
|
1214 |
pdf_dir = "/home/user/app"
|
1215 |
# Output ZIP file name
|
1216 |
+
zip_file_name = "pdf_files.zip"
|
1217 |
print(zip_file_name)
|
1218 |
zip_files_in_folder(directory, zip_file_name)
|
1219 |
create_file_HF(zip_file_name,directory, False)
|
|
|
1289 |
if file.endswith(".pdf"): # Only include PDF files
|
1290 |
file_path = os.path.join(root, file)
|
1291 |
# Add file to the ZIP archive
|
1292 |
+
zipf.write(file_path, file)
|
1293 |
print(f"ZIP file created: {output_zip}")
|
1294 |
|
1295 |
def directory_exists(repo_id, directory, token):
|