Spaces:
Sleeping
Sleeping
Anushkabhat9
commited on
Update app.py
Browse filesAdd top level heading
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("
|
|
|
|
|
|
|
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)
|