Anushkabhat9 commited on
Commit
7e680b4
·
verified ·
1 Parent(s): 6dc841d

Update app.py

Browse files

Add top level heading

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -377,7 +377,10 @@ if uploaded_resume and uploaded_job_description:
377
  lines = generated_resume.splitlines()
378
 
379
  for line in lines:
380
- if line.startswith("## "): # Main heading (Level 1)
 
 
 
381
  paragraph = doc.add_heading(line[3:].strip(), level=1)
382
  paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
383
  elif line.startswith("### "): # Subheading (Level 2)
 
377
  lines = generated_resume.splitlines()
378
 
379
  for line in lines:
380
+ if line.startswith("# "): # Top-level heading (Highest level)
381
+ paragraph = doc.add_heading(line[2:].strip(), level=0) # Level 0 is the highest heading in Word
382
+ paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
383
+ elif line.startswith("## "): # Main heading (Level 1)
384
  paragraph = doc.add_heading(line[3:].strip(), level=1)
385
  paragraph.alignment = WD_PARAGRAPH_ALIGNMENT.JUSTIFY
386
  elif line.startswith("### "): # Subheading (Level 2)