Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -150,7 +150,7 @@ with col2:
|
|
150 |
uploaded_job_description = st.file_uploader("Upload Job Description (.docx or .pdf)", type=["docx", "pdf"], key="job_description")
|
151 |
|
152 |
def get_score(resume_path, job_description_path):
|
153 |
-
similarity_score = similarity_main_gemini(resume_path, job_description_path)
|
154 |
if isinstance(similarity_score, str) and '%' in similarity_score:
|
155 |
similarity_score = float(similarity_score.replace('%', ''))
|
156 |
|
@@ -158,13 +158,14 @@ def get_score(resume_path, job_description_path):
|
|
158 |
if similarity_score < 50:
|
159 |
st.markdown('<p style="color: red; font-weight: bold;">Low chance, skills gap identified!</p>', unsafe_allow_html=True)
|
160 |
pie_colors = ['#FF4B4B', '#E5E5E5']
|
|
|
161 |
elif 50 <= similarity_score < 70:
|
162 |
st.markdown('<p style="color: red; font-weight: bold;">Good chance but you can improve further!</p>', unsafe_allow_html=True)
|
163 |
pie_colors = ['#FFC107', '#E5E5E5']
|
164 |
else:
|
165 |
st.markdown('<p style="color: green; font-weight: bold;">Excellent! You can submit your CV.</p>', unsafe_allow_html=True)
|
166 |
pie_colors = ['#4CAF50', '#E5E5E5']
|
167 |
-
|
168 |
return similarity_score, pie_colors
|
169 |
|
170 |
def display_score(similarity, colors):
|
|
|
150 |
uploaded_job_description = st.file_uploader("Upload Job Description (.docx or .pdf)", type=["docx", "pdf"], key="job_description")
|
151 |
|
152 |
def get_score(resume_path, job_description_path):
|
153 |
+
similarity_score, reason = similarity_main_gemini(resume_path, job_description_path)
|
154 |
if isinstance(similarity_score, str) and '%' in similarity_score:
|
155 |
similarity_score = float(similarity_score.replace('%', ''))
|
156 |
|
|
|
158 |
if similarity_score < 50:
|
159 |
st.markdown('<p style="color: red; font-weight: bold;">Low chance, skills gap identified!</p>', unsafe_allow_html=True)
|
160 |
pie_colors = ['#FF4B4B', '#E5E5E5']
|
161 |
+
|
162 |
elif 50 <= similarity_score < 70:
|
163 |
st.markdown('<p style="color: red; font-weight: bold;">Good chance but you can improve further!</p>', unsafe_allow_html=True)
|
164 |
pie_colors = ['#FFC107', '#E5E5E5']
|
165 |
else:
|
166 |
st.markdown('<p style="color: green; font-weight: bold;">Excellent! You can submit your CV.</p>', unsafe_allow_html=True)
|
167 |
pie_colors = ['#4CAF50', '#E5E5E5']
|
168 |
+
st.write(reason)
|
169 |
return similarity_score, pie_colors
|
170 |
|
171 |
def display_score(similarity, colors):
|