CoralLeiCN
commited on
Commit
·
7681f16
1
Parent(s):
ccf895d
Fix formatting issues in question_scorer and normalize_str functions
Browse files- agent/score.py +2 -2
agent/score.py
CHANGED
@@ -37,7 +37,7 @@ def question_scorer(
|
|
37 |
return True
|
38 |
except ValueError:
|
39 |
return False
|
40 |
-
|
41 |
if model_answer is None:
|
42 |
model_answer = "None"
|
43 |
|
@@ -102,4 +102,4 @@ def normalize_str(input_str, remove_punct=True) -> str:
|
|
102 |
translator = str.maketrans("", "", string.punctuation)
|
103 |
return no_spaces.lower().translate(translator)
|
104 |
else:
|
105 |
-
return no_spaces.lower()
|
|
|
37 |
return True
|
38 |
except ValueError:
|
39 |
return False
|
40 |
+
|
41 |
if model_answer is None:
|
42 |
model_answer = "None"
|
43 |
|
|
|
102 |
translator = str.maketrans("", "", string.punctuation)
|
103 |
return no_spaces.lower().translate(translator)
|
104 |
else:
|
105 |
+
return no_spaces.lower()
|