mMonika commited on
Commit
6409eb1
Β·
verified Β·
1 Parent(s): fdbc20c

outpufiles

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -559,7 +559,7 @@ def process_resume(api_key, job_url, company_name, resume_pdf,output_files):
559
  # Get the list of files in the output folder for download
560
  output_files = [os.path.join(OUTPUT_DIR, f) for f in os.listdir(OUTPUT_DIR) if os.path.isfile(os.path.join(OUTPUT_DIR, f))]
561
 
562
- return result, gr.output_files(visible=True)
563
 
564
  except Exception as e:
565
  error_msg = f"❌ An error occurred:\n\n{str(e)}\n\n{traceback.format_exc()}"
@@ -579,9 +579,9 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
579
  output = gr.Textbox(label="πŸ“ Agent Output", interactive=True)
580
  gr.Markdown("Get your optimized resume below")
581
 
582
- output_files = gr.File(label="πŸ“‚ Download Processed Files", interactive=True, visible= False)
583
 
584
- btn.click(process_resume, inputs=[api_key, job_url, company_name, resume_pdf,output_files], outputs=[output, output_files])
585
 
586
  # Launch the UI
587
  if __name__ == "__main__":
 
559
  # Get the list of files in the output folder for download
560
  output_files = [os.path.join(OUTPUT_DIR, f) for f in os.listdir(OUTPUT_DIR) if os.path.isfile(os.path.join(OUTPUT_DIR, f))]
561
 
562
+ return result, output_files
563
 
564
  except Exception as e:
565
  error_msg = f"❌ An error occurred:\n\n{str(e)}\n\n{traceback.format_exc()}"
 
579
  output = gr.Textbox(label="πŸ“ Agent Output", interactive=True)
580
  gr.Markdown("Get your optimized resume below")
581
 
582
+ output_files = gr.File(label="πŸ“‚ Download Processed Files", interactive=True)
583
 
584
+ btn.click(process_resume, inputs=[api_key, job_url, company_name, resume_pdf], outputs=[output, output_files])
585
 
586
  # Launch the UI
587
  if __name__ == "__main__":