pktpaulie commited on
Commit
e3a4497
·
verified ·
1 Parent(s): 97f8223

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -418,7 +418,17 @@ if uploaded_resume and uploaded_job_description:
418
  if generated_resume is not None:
419
 
420
  from io import BytesIO
421
-
 
 
 
 
 
 
 
 
 
 
422
  with tempfile.NamedTemporaryFile(suffix='.docx') as temp_doc:
423
  doc = Document()
424
  doc.add_paragraph(generated_resume)
 
418
  if generated_resume is not None:
419
 
420
  from io import BytesIO
421
+ with tempfile.NamedTemporaryFile(delete=False, suffix=".docx") as temp_doc:
422
+ temp_doc_path = temp_doc.name
423
+ doc.save(temp_doc_path)
424
+
425
+ # Now pass the path to any function that expects a file path
426
+ pdf_path = '/tmp/generated_resume.pdf'
427
+ save_docx_as_pdf(temp_doc_path, pdf_path)
428
+
429
+ # Display the generated PDF or handle further processing
430
+ display_doc_as_image(pdf_output_path)
431
+
432
  with tempfile.NamedTemporaryFile(suffix='.docx') as temp_doc:
433
  doc = Document()
434
  doc.add_paragraph(generated_resume)