Spaces:
Sleeping
Sleeping
Edvin Behdadijd commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,17 +61,8 @@ def main(resume_text, job_description):
|
|
| 61 |
|
| 62 |
def process_files(resume_file, job_description_file):
|
| 63 |
try:
|
| 64 |
-
|
| 65 |
-
|
| 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 |
|
|
|
|
| 61 |
|
| 62 |
def process_files(resume_file, job_description_file):
|
| 63 |
try:
|
| 64 |
+
resume_text = resume_file.decode('utf-8')
|
| 65 |
+
job_description = job_description_file.decode('utf-8')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
output = main(resume_text, job_description)
|
| 68 |
|