Spaces:
Sleeping
Sleeping
Update reccomendation.py
Browse files- reccomendation.py +2 -2
reccomendation.py
CHANGED
@@ -688,7 +688,7 @@ def analyze_job_fit(job_description: str, resume_file_path: str) -> dict:
|
|
688 |
|
689 |
try:
|
690 |
# Make the API request with longer timeout for cloud environments
|
691 |
-
response = requests.post(url, headers=headers, files=files, data=data, timeout=
|
692 |
|
693 |
# If we get an authentication error, try to get a fresh token and retry once
|
694 |
if response.status_code == 401:
|
@@ -701,7 +701,7 @@ def analyze_job_fit(job_description: str, resume_file_path: str) -> dict:
|
|
701 |
# Close the previous file and reopen
|
702 |
files['resume'][1].close()
|
703 |
files['resume'] = (os.path.basename(resume_file_path), open(resume_file_path, 'rb'), 'application/pdf')
|
704 |
-
response = requests.post(url, headers=headers, files=files, data=data, timeout=
|
705 |
else:
|
706 |
# If we can't get a fresh token, return error
|
707 |
return {"error": "Authentication failed and could not obtain fresh token"}
|
|
|
688 |
|
689 |
try:
|
690 |
# Make the API request with longer timeout for cloud environments
|
691 |
+
response = requests.post(url, headers=headers, files=files, data=data, timeout=None)
|
692 |
|
693 |
# If we get an authentication error, try to get a fresh token and retry once
|
694 |
if response.status_code == 401:
|
|
|
701 |
# Close the previous file and reopen
|
702 |
files['resume'][1].close()
|
703 |
files['resume'] = (os.path.basename(resume_file_path), open(resume_file_path, 'rb'), 'application/pdf')
|
704 |
+
response = requests.post(url, headers=headers, files=files, data=data, timeout=None)
|
705 |
else:
|
706 |
# If we can't get a fresh token, return error
|
707 |
return {"error": "Authentication failed and could not obtain fresh token"}
|