Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,8 +18,8 @@ def upload_cvs(files):
|
|
18 |
cv_texts = [extract_text_from_file(f.name) for f in files]
|
19 |
cv_names = [f.name for f in files]
|
20 |
cv_vectors = get_embeddings(cv_texts)
|
21 |
-
|
22 |
-
if
|
23 |
return "❌ No valid CVs extracted or embedded."
|
24 |
|
25 |
faiss_index = create_faiss_index(cv_vectors)
|
@@ -28,6 +28,7 @@ def upload_cvs(files):
|
|
28 |
except Exception as e:
|
29 |
return f"❌ Error during upload: {e}"
|
30 |
|
|
|
31 |
def match_jd(jd_text):
|
32 |
global faiss_index
|
33 |
|
|
|
18 |
cv_texts = [extract_text_from_file(f.name) for f in files]
|
19 |
cv_names = [f.name for f in files]
|
20 |
cv_vectors = get_embeddings(cv_texts)
|
21 |
+
|
22 |
+
if cv_vectors is None or len(cv_vectors) == 0:
|
23 |
return "❌ No valid CVs extracted or embedded."
|
24 |
|
25 |
faiss_index = create_faiss_index(cv_vectors)
|
|
|
28 |
except Exception as e:
|
29 |
return f"❌ Error during upload: {e}"
|
30 |
|
31 |
+
|
32 |
def match_jd(jd_text):
|
33 |
global faiss_index
|
34 |
|