Spaces:
Sleeping
Sleeping
Commit
·
be16381
1
Parent(s):
7c38433
Update app.py: adjust file handling and UI for resume optimization
Browse files
app.py
CHANGED
@@ -63,6 +63,10 @@ def process_resume(openai_api_key, serper_api_key, model_choice, new_resume, com
|
|
63 |
if new_resume is None or not (hasattr(new_resume, "name") and new_resume.name.strip() != ""):
|
64 |
return ("Error: Please upload a resume.", None, None, None, None, None, None)
|
65 |
|
|
|
|
|
|
|
|
|
66 |
# --- Save the uploaded file into "knowledge" directory ---
|
67 |
if hasattr(new_resume, "read"):
|
68 |
original_filename = os.path.basename(new_resume.name)
|
|
|
63 |
if new_resume is None or not (hasattr(new_resume, "name") and new_resume.name.strip() != ""):
|
64 |
return ("Error: Please upload a resume.", None, None, None, None, None, None)
|
65 |
|
66 |
+
# -- [MINIMAL CHANGE] -- Set environment variables so CrewAI sees these keys
|
67 |
+
os.environ["OPENAI_API_KEY"] = openai_api_key or ""
|
68 |
+
os.environ["SERPER_API_KEY"] = serper_api_key or ""
|
69 |
+
|
70 |
# --- Save the uploaded file into "knowledge" directory ---
|
71 |
if hasattr(new_resume, "read"):
|
72 |
original_filename = os.path.basename(new_resume.name)
|