Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,8 +61,17 @@ def main(resume_text, job_description):
|
|
61 |
|
62 |
def process_files(resume_file, job_description_file):
|
63 |
try:
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
output = main(resume_text, job_description)
|
68 |
|
|
|
61 |
|
62 |
def process_files(resume_file, job_description_file):
|
63 |
try:
|
64 |
+
with tempfile.NamedTemporaryFile(delete=False, suffix=".txt") as tmp_resume_file:
|
65 |
+
tmp_resume_file.write(resume_file.read())
|
66 |
+
tmp_resume_file.flush()
|
67 |
+
with open(tmp_resume_file.name, 'r', encoding='utf-8') as f:
|
68 |
+
resume_text = f.read()
|
69 |
+
|
70 |
+
with tempfile.NamedTemporaryFile(delete=False, suffix=".txt") as tmp_job_file:
|
71 |
+
tmp_job_file.write(job_description_file.read())
|
72 |
+
tmp_job_file.flush()
|
73 |
+
with open(tmp_job_file.name, 'r', encoding='utf-8') as f:
|
74 |
+
job_description = f.read()
|
75 |
|
76 |
output = main(resume_text, job_description)
|
77 |
|