Spaces:
Sleeping
Sleeping
Add Poppler Path
Browse files
app.py
CHANGED
@@ -126,7 +126,7 @@ def get_score(resume_path, job_description_path):
|
|
126 |
st.markdown('<p style="color: red; font-weight: bold;">Low chance, skills gap identified!</p>', unsafe_allow_html=True)
|
127 |
pie_colors = ['#FF4B4B', '#E5E5E5']
|
128 |
elif 50 <= similarity_score < 70:
|
129 |
-
st.markdown('<p style="color: red; font-weight: bold;">Good chance but you can improve further!</p>')
|
130 |
pie_colors = ['#FFC107', '#E5E5E5']
|
131 |
else:
|
132 |
st.markdown('<p style="color: green; font-weight: bold;">Excellent! You can submit your CV.</p>', unsafe_allow_html=True)
|
@@ -159,7 +159,8 @@ def save_docx_as_pdf(doc_content, output_path='output.pdf'):
|
|
159 |
os.remove(temp_doc_path)
|
160 |
|
161 |
def display_doc_as_image(pdf_path):
|
162 |
-
|
|
|
163 |
for img in images:
|
164 |
buf = BytesIO()
|
165 |
img.save(buf, format="PNG")
|
|
|
126 |
st.markdown('<p style="color: red; font-weight: bold;">Low chance, skills gap identified!</p>', unsafe_allow_html=True)
|
127 |
pie_colors = ['#FF4B4B', '#E5E5E5']
|
128 |
elif 50 <= similarity_score < 70:
|
129 |
+
st.markdown('<p style="color: red; font-weight: bold;">Good chance but you can improve further!</p>', unsafe_allow_html=True)
|
130 |
pie_colors = ['#FFC107', '#E5E5E5']
|
131 |
else:
|
132 |
st.markdown('<p style="color: green; font-weight: bold;">Excellent! You can submit your CV.</p>', unsafe_allow_html=True)
|
|
|
159 |
os.remove(temp_doc_path)
|
160 |
|
161 |
def display_doc_as_image(pdf_path):
|
162 |
+
poppler_path = 'usr/bin'
|
163 |
+
images = convert_from_path(pdf_path, poppler_path=poppler_path)
|
164 |
for img in images:
|
165 |
buf = BytesIO()
|
166 |
img.save(buf, format="PNG")
|