Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -147,10 +147,49 @@ def compute_similarity(resume_text, job_list):
|
|
| 147 |
best_job = metrics["Average"].idxmax()
|
| 148 |
reasoning = f"<b>The best job match is {best_job} based on the highest average similarity score.</b>"
|
| 149 |
|
|
|
|
| 150 |
description = """
|
| 151 |
<p><b>Explanation of the Table:</b></p>
|
| 152 |
-
<
|
| 153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
"""
|
| 155 |
|
| 156 |
return reasoning, styled_df + description
|
|
@@ -237,7 +276,7 @@ def add_job_to_list(current_job, job_list):
|
|
| 237 |
return updated_list, display_html, "" # Clear the input box
|
| 238 |
|
| 239 |
def clear_jobs():
|
| 240 |
-
return [], "", ""
|
| 241 |
|
| 242 |
# --- Main Processing ---
|
| 243 |
def process_and_display(resume, job_list, request=None):
|
|
|
|
| 147 |
best_job = metrics["Average"].idxmax()
|
| 148 |
reasoning = f"<b>The best job match is {best_job} based on the highest average similarity score.</b>"
|
| 149 |
|
| 150 |
+
# --- RESTORED FULL DESCRIPTION AND REFERENCES ---
|
| 151 |
description = """
|
| 152 |
<p><b>Explanation of the Table:</b></p>
|
| 153 |
+
<ul>
|
| 154 |
+
<li><b>Models:</b> Each row corresponds to a pre-trained model used for computing similarity. Below are details about each model:</li>
|
| 155 |
+
<ul>
|
| 156 |
+
<li><b>all-MiniLM-L6-v2:</b> Trained on NLI and STS datasets. Developed by Hugging Face and Microsoft.
|
| 157 |
+
(<a href="https://arxiv.org/abs/2012.15832" target="_blank">Research Paper</a>,
|
| 158 |
+
<a href="https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2" target="_blank">Model Card</a>).</li>
|
| 159 |
+
<li><b>paraphrase-MiniLM-L6-v2:</b> Optimized for paraphrase detection on datasets like Quora Questions and MSRPC.
|
| 160 |
+
(<a href="https://arxiv.org/abs/2012.15832" target="_blank">Research Paper</a>,
|
| 161 |
+
<a href="https://huggingface.co/sentence-transformers/paraphrase-MiniLM-L6-v2" target="_blank">Model Card</a>).</li>
|
| 162 |
+
<li><b>multi-qa-MiniLM-L6-cos-v1:</b> Fine-tuned for question-answering tasks using datasets like SQuAD and Natural Questions.
|
| 163 |
+
(<a href="https://huggingface.co/sentence-transformers/multi-qa-MiniLM-L6-cos-v1" target="_blank">Model Card</a>).</li>
|
| 164 |
+
<li><b>all-mpnet-base-v2:</b> Robust embeddings for high-contextualized tasks.
|
| 165 |
+
(<a href="https://arxiv.org/abs/2004.09297" target="_blank">Research Paper</a>,
|
| 166 |
+
<a href="https://huggingface.co/sentence-transformers/all-mpnet-base-v2" target="_blank">Model Card</a>).</li>
|
| 167 |
+
<li><b>paraphrase-mpnet-base-v2:</b> Reliable for paraphrase tasks, trained on diverse datasets.
|
| 168 |
+
(<a href="https://huggingface.co/sentence-transformers/paraphrase-mpnet-base-v2" target="_blank">Model Card</a>).</li>
|
| 169 |
+
<li><b>all-distilroberta-v1:</b> A lightweight RoBERTa-based model for sentence embeddings.
|
| 170 |
+
(<a href="https://arxiv.org/abs/1907.11692" target="_blank">Research Paper</a>,
|
| 171 |
+
<a href="https://huggingface.co/sentence-transformers/all-distilroberta-v1" target="_blank">Model Card</a>).</li>
|
| 172 |
+
<li><b>paraphrase-albert-small-v2:</b> Suitable for paraphrasing in resource-constrained environments.
|
| 173 |
+
(<a href="https://huggingface.co/sentence-transformers/paraphrase-albert-small-v2" target="_blank">Model Card</a>).</li>
|
| 174 |
+
<li><b>multi-qa-distilbert-cos-v1:</b> Optimized for multilingual question-answering tasks.
|
| 175 |
+
(<a href="https://huggingface.co/sentence-transformers/multi-qa-distilbert-cos-v1" target="_blank">Model Card</a>).</li>
|
| 176 |
+
<li><b>distiluse-base-multilingual-cased-v2:</b> Trained on multilingual datasets for cross-lingual embeddings.
|
| 177 |
+
(<a href="https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased-v2" target="_blank">Model Card</a>).</li>
|
| 178 |
+
<li><b>all-MiniLM-L12-v2:</b> Deeper MiniLM variant for enhanced contextual understanding.
|
| 179 |
+
(<a href="https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2" target="_blank">Model Card</a>).</li>
|
| 180 |
+
</ul>
|
| 181 |
+
<li><b>Metrics:</b>
|
| 182 |
+
<ul>
|
| 183 |
+
<li><b>Average:</b> Mean similarity score for each job description.</li>
|
| 184 |
+
<li><b>Variance:</b> Variability in the similarity scores.</li>
|
| 185 |
+
<li><b>Median:</b> Middle value of the similarity scores.</li>
|
| 186 |
+
<li><b>Standard Deviation:</b> Spread of the similarity scores around the mean.</li>
|
| 187 |
+
<li><b>Certainty Score:</b> Indicates model agreement, with 1 being the highest consensus.</li>
|
| 188 |
+
</ul>
|
| 189 |
+
</li>
|
| 190 |
+
</ul>
|
| 191 |
+
<p>If you liked this application, feel free to send your feedback, suggestions, or adulations to
|
| 192 |
+
<b>[email protected]</b>.</p>
|
| 193 |
"""
|
| 194 |
|
| 195 |
return reasoning, styled_df + description
|
|
|
|
| 276 |
return updated_list, display_html, "" # Clear the input box
|
| 277 |
|
| 278 |
def clear_jobs():
|
| 279 |
+
return [], "<i>No jobs added yet...</i>", ""
|
| 280 |
|
| 281 |
# --- Main Processing ---
|
| 282 |
def process_and_display(resume, job_list, request=None):
|