Upload app.py
Browse files
app.py
CHANGED
|
@@ -102,15 +102,15 @@ def analyze_cv_and_jd(cv_text: str, jd_text: str) -> (str, str, str, List[str],
|
|
| 102 |
|
| 103 |
# 4. Formata a saída
|
| 104 |
match_output = f"""
|
| 105 |
-
## 🚀
|
| 106 |
|
| 107 |
-
**Skills
|
| 108 |
---
|
| 109 |
-
{', '.join(sorted(list(matching_skills))) if matching_skills else '
|
| 110 |
"""
|
| 111 |
|
| 112 |
-
cv_exp_str = f"{cv_exp}
|
| 113 |
-
jd_exp_str = f"{jd_exp}
|
| 114 |
|
| 115 |
return (
|
| 116 |
match_output,
|
|
@@ -122,33 +122,33 @@ def analyze_cv_and_jd(cv_text: str, jd_text: str) -> (str, str, str, List[str],
|
|
| 122 |
|
| 123 |
# --- 3. Definição da Interface Gradio ---
|
| 124 |
|
| 125 |
-
with gr.Blocks(title="Hirly -
|
| 126 |
-
gr.Markdown("# 🚀
|
| 127 |
gr.Markdown(
|
| 128 |
-
"
|
| 129 |
-
"skills,
|
| 130 |
)
|
| 131 |
|
| 132 |
with gr.Row():
|
| 133 |
with gr.Column():
|
| 134 |
-
cv_input = gr.Textbox(lines=20, label="
|
| 135 |
with gr.Column():
|
| 136 |
-
jd_input = gr.Textbox(lines=20, label="
|
| 137 |
|
| 138 |
-
analyze_button = gr.Button("
|
| 139 |
|
| 140 |
gr.Markdown("---")
|
| 141 |
|
| 142 |
with gr.Row():
|
| 143 |
with gr.Column(scale=2):
|
| 144 |
-
match_output = gr.Markdown(label="
|
| 145 |
with gr.Column(scale=1):
|
| 146 |
-
cv_exp_output = gr.Textbox(label="
|
| 147 |
-
jd_exp_output = gr.Textbox(label="
|
| 148 |
|
| 149 |
with gr.Row():
|
| 150 |
-
cv_only_output = gr.JSON(label="Skills
|
| 151 |
-
jd_only_output = gr.JSON(label="Skills
|
| 152 |
|
| 153 |
# Conecta o botão à função
|
| 154 |
analyze_button.click(
|
|
|
|
| 102 |
|
| 103 |
# 4. Formata a saída
|
| 104 |
match_output = f"""
|
| 105 |
+
## 🚀 Match Analysis
|
| 106 |
|
| 107 |
+
**Compatible Skills between Resume and Job Description: {len(matching_skills)}**
|
| 108 |
---
|
| 109 |
+
{', '.join(sorted(list(matching_skills))) if matching_skills else 'There is no skills compatiable found.'}
|
| 110 |
"""
|
| 111 |
|
| 112 |
+
cv_exp_str = f"{cv_exp} years"
|
| 113 |
+
jd_exp_str = f"{jd_exp} years (The extraction could list nay requirement, like: '5+ years')"
|
| 114 |
|
| 115 |
return (
|
| 116 |
match_output,
|
|
|
|
| 122 |
|
| 123 |
# --- 3. Definição da Interface Gradio ---
|
| 124 |
|
| 125 |
+
with gr.Blocks(title="Hirly - Resume & Job Description Analysis") as demo:
|
| 126 |
+
gr.Markdown("# 🚀 Resume & Job Description Analysis")
|
| 127 |
gr.Markdown(
|
| 128 |
+
"Enter a resume and a job description for analysis "
|
| 129 |
+
"skills, experience to see they're compatible"
|
| 130 |
)
|
| 131 |
|
| 132 |
with gr.Row():
|
| 133 |
with gr.Column():
|
| 134 |
+
cv_input = gr.Textbox(lines=20, label="Resume Text")
|
| 135 |
with gr.Column():
|
| 136 |
+
jd_input = gr.Textbox(lines=20, label="Job Description Text (JD)")
|
| 137 |
|
| 138 |
+
analyze_button = gr.Button("Execute Analysis", variant="primary")
|
| 139 |
|
| 140 |
gr.Markdown("---")
|
| 141 |
|
| 142 |
with gr.Row():
|
| 143 |
with gr.Column(scale=2):
|
| 144 |
+
match_output = gr.Markdown(label="Match Results")
|
| 145 |
with gr.Column(scale=1):
|
| 146 |
+
cv_exp_output = gr.Textbox(label="Total Experience from Resume", interactive=False)
|
| 147 |
+
jd_exp_output = gr.Textbox(label="Total Experience required from JD", interactive=False)
|
| 148 |
|
| 149 |
with gr.Row():
|
| 150 |
+
cv_only_output = gr.JSON(label="Resume Skills")
|
| 151 |
+
jd_only_output = gr.JSON(label="JD Skills")
|
| 152 |
|
| 153 |
# Conecta o botão à função
|
| 154 |
analyze_button.click(
|