Spaces:
Build error
Build error
fix resume file handling
Browse files
app.py
CHANGED
|
@@ -73,7 +73,7 @@ with gr.Blocks() as demo:
|
|
| 73 |
|
| 74 |
# If a file is uploaded, automatically update the respective variable storing its contents
|
| 75 |
job_desc_file.upload(fn=load_txt_file, inputs=[job_desc_file], outputs=[job_desc_content])
|
| 76 |
-
resume_file.upload(fn=
|
| 77 |
extra_resume_context_file.upload(fn=load_txt_file, inputs=[extra_resume_context_file], outputs=[extra_resume_context_content])
|
| 78 |
freeform_context_file.upload(fn=load_txt_file, inputs=[freeform_context_file], outputs=[freeform_context_content])
|
| 79 |
summary_sample_file.upload(fn=load_txt_file, inputs=[summary_sample_file], outputs=[summary_sample_content])
|
|
|
|
| 73 |
|
| 74 |
# If a file is uploaded, automatically update the respective variable storing its contents
|
| 75 |
job_desc_file.upload(fn=load_txt_file, inputs=[job_desc_file], outputs=[job_desc_content])
|
| 76 |
+
resume_file.upload(fn=load_initial_resume, inputs=[resume_file], outputs=[resume_content])
|
| 77 |
extra_resume_context_file.upload(fn=load_txt_file, inputs=[extra_resume_context_file], outputs=[extra_resume_context_content])
|
| 78 |
freeform_context_file.upload(fn=load_txt_file, inputs=[freeform_context_file], outputs=[freeform_context_content])
|
| 79 |
summary_sample_file.upload(fn=load_txt_file, inputs=[summary_sample_file], outputs=[summary_sample_content])
|
utils.py
CHANGED
|
@@ -55,9 +55,6 @@ def process_analysis(resume_data, job_description, ksas, freeform_context):
|
|
| 55 |
|
| 56 |
def _analysis(resume_data, job_description, ksas, freeform_context):
|
| 57 |
prompt = _analysis_prompt(resume_data, job_description, ksas, freeform_context)
|
| 58 |
-
print(prompt[:1000])
|
| 59 |
-
print("===")
|
| 60 |
-
print(prompt[-1000:])
|
| 61 |
system = """You are an expert resume consultant analyzing candidate fit. Return only JSON in the format: {
|
| 62 |
"analysis": ["key insight 1", "key insight 2", ...],
|
| 63 |
"questions": ["question 1", "question 2", ...],
|
|
|
|
| 55 |
|
| 56 |
def _analysis(resume_data, job_description, ksas, freeform_context):
|
| 57 |
prompt = _analysis_prompt(resume_data, job_description, ksas, freeform_context)
|
|
|
|
|
|
|
|
|
|
| 58 |
system = """You are an expert resume consultant analyzing candidate fit. Return only JSON in the format: {
|
| 59 |
"analysis": ["key insight 1", "key insight 2", ...],
|
| 60 |
"questions": ["question 1", "question 2", ...],
|