Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -175,9 +175,7 @@ def llm_feedback(jd_struct: Dict, resume_struct: Dict, api_key: str, model: str,
|
|
| 175 |
raw = deepinfra_chat(messages, api_key=api_key, model=model, temperature=temperature)
|
| 176 |
return safe_json_loads(raw)
|
| 177 |
|
| 178 |
-
|
| 179 |
-
# Scoring via LLM (0..10)
|
| 180 |
-
# =========================
|
| 181 |
def prompt_for_match(jd_struct: Dict[str, Any], cv_structs: List[Dict[str, Any]]) -> List[Dict[str, str]]:
|
| 182 |
# compact candidates to reduce tokens
|
| 183 |
compact_cands = []
|
|
@@ -245,9 +243,6 @@ def parse_ranked_output(content: str) -> List[Dict[str, Any]]:
|
|
| 245 |
return rows
|
| 246 |
|
| 247 |
|
| 248 |
-
# =========================
|
| 249 |
-
# Pipeline
|
| 250 |
-
# =========================
|
| 251 |
def process(
|
| 252 |
jd_text,
|
| 253 |
jd_file,
|
|
@@ -386,9 +381,7 @@ f"""### Processing Metrics
|
|
| 386 |
return metrics_md, df_show, csv_path, jd_pretty, top5_md
|
| 387 |
|
| 388 |
|
| 389 |
-
|
| 390 |
-
# Gradio UI
|
| 391 |
-
# =========================
|
| 392 |
with gr.Blocks(title="JD β Resume Matcher") as demo:
|
| 393 |
gr.Markdown("# π JD β Resume Matcher\nPaste a Job Description and upload resumes to rank candidates (Score 0β10), get Top-5 details, and download a CSV.")
|
| 394 |
|
|
@@ -453,4 +446,4 @@ with gr.Blocks(title="JD β Resume Matcher") as demo:
|
|
| 453 |
)
|
| 454 |
|
| 455 |
if __name__ == "__main__":
|
| 456 |
-
demo.launch()
|
|
|
|
| 175 |
raw = deepinfra_chat(messages, api_key=api_key, model=model, temperature=temperature)
|
| 176 |
return safe_json_loads(raw)
|
| 177 |
|
| 178 |
+
|
|
|
|
|
|
|
| 179 |
def prompt_for_match(jd_struct: Dict[str, Any], cv_structs: List[Dict[str, Any]]) -> List[Dict[str, str]]:
|
| 180 |
# compact candidates to reduce tokens
|
| 181 |
compact_cands = []
|
|
|
|
| 243 |
return rows
|
| 244 |
|
| 245 |
|
|
|
|
|
|
|
|
|
|
| 246 |
def process(
|
| 247 |
jd_text,
|
| 248 |
jd_file,
|
|
|
|
| 381 |
return metrics_md, df_show, csv_path, jd_pretty, top5_md
|
| 382 |
|
| 383 |
|
| 384 |
+
|
|
|
|
|
|
|
| 385 |
with gr.Blocks(title="JD β Resume Matcher") as demo:
|
| 386 |
gr.Markdown("# π JD β Resume Matcher\nPaste a Job Description and upload resumes to rank candidates (Score 0β10), get Top-5 details, and download a CSV.")
|
| 387 |
|
|
|
|
| 446 |
)
|
| 447 |
|
| 448 |
if __name__ == "__main__":
|
| 449 |
+
demo.launch(share=True)
|