Spaces:
Sleeping
Sleeping
Edvin Behdadijd commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,7 +70,10 @@ def process_files(resume_file, job_description_file):
|
|
| 70 |
json.dump(output, tmp_file, ensure_ascii=False, indent=4)
|
| 71 |
return tmp_file.name
|
| 72 |
except Exception as e:
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
iface = gr.Interface(
|
| 76 |
fn=process_files,
|
|
|
|
| 70 |
json.dump(output, tmp_file, ensure_ascii=False, indent=4)
|
| 71 |
return tmp_file.name
|
| 72 |
except Exception as e:
|
| 73 |
+
# ایجاد یک فایل متنی موقت برای پیام خطا
|
| 74 |
+
with tempfile.NamedTemporaryFile(delete=False, suffix=".txt", mode='w', encoding='utf-8') as tmp_file:
|
| 75 |
+
tmp_file.write(f"Error: {str(e)}")
|
| 76 |
+
return tmp_file.name
|
| 77 |
|
| 78 |
iface = gr.Interface(
|
| 79 |
fn=process_files,
|