Spaces:
Runtime error
Runtime error
Update app/routes.py
Browse files- app/routes.py +3 -3
app/routes.py
CHANGED
|
@@ -104,7 +104,7 @@ def rank_resumes():
|
|
| 104 |
|
| 105 |
if not api_key or not job_description or not resume_files:
|
| 106 |
flash("All fields are required.")
|
| 107 |
-
return redirect(url_for('auth.
|
| 108 |
|
| 109 |
# Validate API key with Supabase
|
| 110 |
response = requests.get(
|
|
@@ -114,13 +114,13 @@ def rank_resumes():
|
|
| 114 |
|
| 115 |
if response.status_code != 200 or not response.json():
|
| 116 |
flash("Invalid API key.")
|
| 117 |
-
return redirect(url_for('auth.
|
| 118 |
|
| 119 |
try:
|
| 120 |
rankings = rank_resumes_by_semantic_similarity(resume_files, job_description)
|
| 121 |
except Exception as e:
|
| 122 |
flash(f"Ranking error: {str(e)}")
|
| 123 |
-
return redirect(url_for('auth.
|
| 124 |
|
| 125 |
return render_template('resume_rankings.html', rankings=rankings, job_description=job_description)
|
| 126 |
|
|
|
|
| 104 |
|
| 105 |
if not api_key or not job_description or not resume_files:
|
| 106 |
flash("All fields are required.")
|
| 107 |
+
return redirect(url_for('auth.rank_resumes'))
|
| 108 |
|
| 109 |
# Validate API key with Supabase
|
| 110 |
response = requests.get(
|
|
|
|
| 114 |
|
| 115 |
if response.status_code != 200 or not response.json():
|
| 116 |
flash("Invalid API key.")
|
| 117 |
+
return redirect(url_for('auth.rank_resumes'))
|
| 118 |
|
| 119 |
try:
|
| 120 |
rankings = rank_resumes_by_semantic_similarity(resume_files, job_description)
|
| 121 |
except Exception as e:
|
| 122 |
flash(f"Ranking error: {str(e)}")
|
| 123 |
+
return redirect(url_for('auth.rank_resumes'))
|
| 124 |
|
| 125 |
return render_template('resume_rankings.html', rankings=rankings, job_description=job_description)
|
| 126 |
|