Skip to content

Commit

Permalink
modified: code/judge.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HuangZhen02 committed Jun 17, 2024
1 parent 2949429 commit 249aa49
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions code/judge.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,14 @@ def extract_boxed_answer(self, text):
elif text[end_index] == '}':
stack -= 1
end_index += 1
if stack == 0:
content = text[start_index:end_index - 1]
if not content:
return text
else:
content = self.normalize_answer(content)
return content
return text
else:
return text
if stack == 0:
content = text[start_index:end_index - 1]
if not content:
return text
else:
content = self.normalize_answer(content)
return content
return text


def split_by_comma(self, expr: str):
Expand Down

0 comments on commit 249aa49

Please sign in to comment.