Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -132,20 +132,34 @@ def resume_agent(file_path, location):
|
|
| 132 |
|
| 133 |
with gr.Blocks() as demo:
|
| 134 |
gr.Markdown("# Resume Feedback and Job Matching Tool")
|
|
|
|
| 135 |
with gr.Row():
|
| 136 |
with gr.Column():
|
| 137 |
resume_upload = gr.File(label="Upload Your Resume (PDF or DOCX)")
|
| 138 |
location_input = gr.Textbox(label="Preferred Location", placeholder="e.g., San Francisco")
|
| 139 |
submit_button = gr.Button("Submit")
|
|
|
|
| 140 |
with gr.Column():
|
| 141 |
feedback_output = gr.Markdown(label="Resume Feedback")
|
| 142 |
improved_resume_output = gr.Markdown(label="Improved Resume")
|
| 143 |
job_roles_output = gr.Markdown(label="Relevant Job Roles")
|
| 144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
submit_button.click(
|
| 146 |
resume_agent,
|
| 147 |
inputs=[resume_upload, location_input],
|
| 148 |
outputs=[feedback_output, improved_resume_output, job_roles_output]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
)
|
| 150 |
|
| 151 |
demo.launch()
|
|
|
|
| 132 |
|
| 133 |
with gr.Blocks() as demo:
|
| 134 |
gr.Markdown("# Resume Feedback and Job Matching Tool")
|
| 135 |
+
|
| 136 |
with gr.Row():
|
| 137 |
with gr.Column():
|
| 138 |
resume_upload = gr.File(label="Upload Your Resume (PDF or DOCX)")
|
| 139 |
location_input = gr.Textbox(label="Preferred Location", placeholder="e.g., San Francisco")
|
| 140 |
submit_button = gr.Button("Submit")
|
| 141 |
+
|
| 142 |
with gr.Column():
|
| 143 |
feedback_output = gr.Markdown(label="Resume Feedback")
|
| 144 |
improved_resume_output = gr.Markdown(label="Improved Resume")
|
| 145 |
job_roles_output = gr.Markdown(label="Relevant Job Roles")
|
| 146 |
|
| 147 |
+
# Define the click event for the submit button
|
| 148 |
+
def format_outputs(feedback, improved_resume, job_roles):
|
| 149 |
+
# Add bold headings to each section
|
| 150 |
+
feedback_with_heading = f"**RESUME FEEDBACK:**\n\n{feedback}"
|
| 151 |
+
improved_resume_with_heading = f"**IMPROVED RESUME:**\n\n{improved_resume}"
|
| 152 |
+
job_roles_with_heading = f"**RELEVANT JOB ROLES:**\n\n{job_roles}"
|
| 153 |
+
return feedback_with_heading, improved_resume_with_heading, job_roles_with_heading
|
| 154 |
+
|
| 155 |
submit_button.click(
|
| 156 |
resume_agent,
|
| 157 |
inputs=[resume_upload, location_input],
|
| 158 |
outputs=[feedback_output, improved_resume_output, job_roles_output]
|
| 159 |
+
).then(
|
| 160 |
+
format_outputs,
|
| 161 |
+
inputs=[feedback_output, improved_resume_output, job_roles_output],
|
| 162 |
+
outputs=[feedback_output, improved_resume_output, job_roles_output]
|
| 163 |
)
|
| 164 |
|
| 165 |
demo.launch()
|