Spaces:
Build error
Build error
Update similarity_score_refined.py
Browse files
similarity_score_refined.py
CHANGED
|
@@ -33,7 +33,7 @@ def read_file(file_path):
|
|
| 33 |
raise PackageNotFoundError(f"The file {file_path} is not a valid docx file. It may be corrupted or of a different format.")
|
| 34 |
|
| 35 |
import os
|
| 36 |
-
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "/content/drive/MyDrive/Resume/firm-capsule-436804-b5-5f553d9f1043.json"
|
| 37 |
|
| 38 |
import os
|
| 39 |
# from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
@@ -102,7 +102,7 @@ And the job description below:
|
|
| 102 |
for line in lines:
|
| 103 |
if line.lower().startswith("score:"):
|
| 104 |
try:
|
| 105 |
-
score = float(line.split(":", 1)[1].strip())
|
| 106 |
except ValueError:
|
| 107 |
raise ValueError(f"Invalid score format: {line}")
|
| 108 |
elif line.lower().startswith("reason:"):
|
|
|
|
| 33 |
raise PackageNotFoundError(f"The file {file_path} is not a valid docx file. It may be corrupted or of a different format.")
|
| 34 |
|
| 35 |
import os
|
| 36 |
+
# os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "/content/drive/MyDrive/Resume/firm-capsule-436804-b5-5f553d9f1043.json"
|
| 37 |
|
| 38 |
import os
|
| 39 |
# from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
|
|
| 102 |
for line in lines:
|
| 103 |
if line.lower().startswith("score:"):
|
| 104 |
try:
|
| 105 |
+
score = float(line.split(":", 1)[1].strip())*100
|
| 106 |
except ValueError:
|
| 107 |
raise ValueError(f"Invalid score format: {line}")
|
| 108 |
elif line.lower().startswith("reason:"):
|