Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -377,23 +377,23 @@ if uploaded_resume and uploaded_job_description:
377
 
378
  for line in lines:
379
  if line.startswith("## "): # Main heading (Level 1)
380
- paragraph = doc.add_heading(line[3:].strip(), level=1)
381
- paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
382
- elif line.startswith("### "): # Subheading (Level 2)
383
- paragraph = doc.add_heading(line[4:].strip(), level=2)
384
- paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
385
- elif line.startswith("- "): # Bullet points
386
- paragraph = doc.add_paragraph(style="List Bullet")
387
- add_bold_and_normal_text(paragraph, line[2:].strip())
388
- paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
389
- elif line.startswith("* "): # Sub-bullet points or normal list items
390
- paragraph = doc.add_paragraph(style="List Bullet 2")
391
- add_bold_and_normal_text(paragraph, line[2:].strip())
392
- paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
393
- elif line.strip(): # Normal text (ignores blank lines)
394
- paragraph = doc.add_paragraph()
395
- add_bold_and_normal_text(paragraph, line.strip())
396
- paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
397
 
398
  # Save the generated document as a .docx file in memory
399
  resume_bytes = BytesIO()
 
377
 
378
  for line in lines:
379
  if line.startswith("## "): # Main heading (Level 1)
380
+ paragraph = doc.add_heading(line[3:].strip(), level=1)
381
+ paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
382
+ elif line.startswith("### "): # Subheading (Level 2)
383
+ paragraph = doc.add_heading(line[4:].strip(), level=2)
384
+ paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
385
+ elif line.startswith("- "): # Bullet points
386
+ paragraph = doc.add_paragraph(style="List Bullet")
387
+ add_bold_and_normal_text(paragraph, line[2:].strip())
388
+ paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
389
+ elif line.startswith("* "): # Sub-bullet points or normal list items
390
+ paragraph = doc.add_paragraph(style="List Bullet 2")
391
+ add_bold_and_normal_text(paragraph, line[2:].strip())
392
+ paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
393
+ elif line.strip(): # Normal text (ignores blank lines)
394
+ paragraph = doc.add_paragraph()
395
+ add_bold_and_normal_text(paragraph, line.strip())
396
+ paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
397
 
398
  # Save the generated document as a .docx file in memory
399
  resume_bytes = BytesIO()