Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -263,7 +263,7 @@ def main_process(files, tanggal_berangkat, tanggal_pulang, api_key):
|
|
| 263 |
doc.save(temp_docx_path)
|
| 264 |
|
| 265 |
# Filtering the file
|
| 266 |
-
zip_file_path =
|
| 267 |
return temp_docx_path, valid_list, zip_file_path
|
| 268 |
|
| 269 |
|
|
@@ -295,11 +295,11 @@ with gr.Blocks() as demo:
|
|
| 295 |
)
|
| 296 |
|
| 297 |
run_btn = gr.Button("π Run Analysis")
|
| 298 |
-
output = gr.Textbox(label="π
|
| 299 |
|
| 300 |
with gr.Row():
|
| 301 |
download_output_docx = gr.File(label="π₯ Download Summary as DOCX", visible=True)
|
| 302 |
-
download_valid_zip = gr.File(label="π₯ Download
|
| 303 |
|
| 304 |
run_btn.click(
|
| 305 |
fn=main_process,
|
|
|
|
| 263 |
doc.save(temp_docx_path)
|
| 264 |
|
| 265 |
# Filtering the file
|
| 266 |
+
zip_file_path = process_and_zip_all_images(all_images, api_key, zip_name=f'PDF_ZIP_{base_name}.zip')
|
| 267 |
return temp_docx_path, valid_list, zip_file_path
|
| 268 |
|
| 269 |
|
|
|
|
| 295 |
)
|
| 296 |
|
| 297 |
run_btn = gr.Button("π Run Analysis")
|
| 298 |
+
output = gr.Textbox(label="π INVALID DOCUMENT LIST", lines=5)
|
| 299 |
|
| 300 |
with gr.Row():
|
| 301 |
download_output_docx = gr.File(label="π₯ Download Summary as DOCX", visible=True)
|
| 302 |
+
download_valid_zip = gr.File(label="π₯ Download all PDF document in zip", visible=True)
|
| 303 |
|
| 304 |
run_btn.click(
|
| 305 |
fn=main_process,
|