Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,3 +35,48 @@ if uploaded_file is not None:
|
|
| 35 |
|
| 36 |
for k, v in score_breakdown.items():
|
| 37 |
st.write(f"- {k}: {v}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
for k, v in score_breakdown.items():
|
| 37 |
st.write(f"- {k}: {v}")
|
| 38 |
+
|
| 39 |
+
with st.expander("Certification Suggestions"):
|
| 40 |
+
certs = get_certification_suggestions(parsed_text)
|
| 41 |
+
st.write(certs)
|
| 42 |
+
|
| 43 |
+
with st.expander("Higher Education Suggestions"):
|
| 44 |
+
edu = get_higher_education_suggestions(parsed_text)
|
| 45 |
+
st.write(edu)
|
| 46 |
+
|
| 47 |
+
with st.expander("Visa Recommendations"):
|
| 48 |
+
visa = get_visa_recommendations(parsed_text)
|
| 49 |
+
st.write(visa)
|
| 50 |
+
|
| 51 |
+
with st.expander("Career Advice"):
|
| 52 |
+
advice = get_career_advice(parsed_text)
|
| 53 |
+
st.write(advice)
|
| 54 |
+
|
| 55 |
+
with st.expander("Job Listings"):
|
| 56 |
+
jobs = get_job_listings(parsed_text)
|
| 57 |
+
for job in jobs:
|
| 58 |
+
st.write(f"- {job}")
|
| 59 |
+
|
| 60 |
+
# Download full report as text
|
| 61 |
+
def generate_report():
|
| 62 |
+
report = f"CV Analysis Report - Generated on {datetime.datetime.now()}\n\n"
|
| 63 |
+
report += f"CV Type: {cv_type}\n"
|
| 64 |
+
report += f"Education Level: {education_level}\n"
|
| 65 |
+
report += f"Overall CV Score: {score} / 100\n\n"
|
| 66 |
+
report += "Score Breakdown:\n"
|
| 67 |
+
for k, v in score_breakdown.items():
|
| 68 |
+
report += f"- {k}: {v}\n"
|
| 69 |
+
report += "\nCertification Suggestions:\n" + certs + "\n\n"
|
| 70 |
+
report += "Higher Education Suggestions:\n" + edu + "\n\n"
|
| 71 |
+
report += "Visa Recommendations:\n" + visa + "\n\n"
|
| 72 |
+
report += "Career Advice:\n" + advice + "\n\n"
|
| 73 |
+
report += "Job Listings:\n"
|
| 74 |
+
for job in jobs:
|
| 75 |
+
report += f"- {job}\n"
|
| 76 |
+
return report
|
| 77 |
+
|
| 78 |
+
report_text = generate_report()
|
| 79 |
+
b64 = base64.b64encode(report_text.encode()).decode()
|
| 80 |
+
href = f'<a href="data:file/txt;base64,{b64}" download="cv_analysis_report.txt">Download Full CV Analysis Report</a>'
|
| 81 |
+
st.markdown(href, unsafe_allow_html=True)
|
| 82 |
+
|