Spaces:
Build error
Build error
Update similarity_score_refined.py
Browse files
similarity_score_refined.py
CHANGED
|
@@ -96,12 +96,13 @@ And the job description below:
|
|
| 96 |
lines = content_text.split("\n")
|
| 97 |
score = None
|
| 98 |
reason = None
|
| 99 |
-
|
| 100 |
for line in lines:
|
| 101 |
if line.lower().startswith("score:"):
|
| 102 |
try:
|
| 103 |
line_cleaned = line.replace("**", "").strip()
|
| 104 |
-
score = float(line_cleaned.split(":", 1)[1].strip())
|
|
|
|
| 105 |
except ValueError:
|
| 106 |
raise ValueError(f"Invalid score format: {line}")
|
| 107 |
elif line.lower().startswith("reason:"):
|
|
|
|
| 96 |
lines = content_text.split("\n")
|
| 97 |
score = None
|
| 98 |
reason = None
|
| 99 |
+
|
| 100 |
for line in lines:
|
| 101 |
if line.lower().startswith("score:"):
|
| 102 |
try:
|
| 103 |
line_cleaned = line.replace("**", "").strip()
|
| 104 |
+
score = float(line_cleaned.split(":", 1)[1].strip()) * 100
|
| 105 |
+
score = round(score, 2)
|
| 106 |
except ValueError:
|
| 107 |
raise ValueError(f"Invalid score format: {line}")
|
| 108 |
elif line.lower().startswith("reason:"):
|