facat commited on
Commit
6d6787f
1 Parent(s): 58f14b3
Files changed (1) hide show
  1. utils.py +3 -2
utils.py CHANGED
@@ -288,9 +288,10 @@ def strip_string(string):
288
 
289
  # NOTE: X/Y changed to \frac{X}{Y} in dataset, but in simple cases fix in case the model output is X/Y
290
  # string = fix_a_slash_b(string)
291
- if string.startswith("\\boxed{") and string.endswith("}"):
292
- string = string[7:-1]
293
  string = string.split("=")[-1]
 
 
 
294
  return string
295
 
296
 
 
288
 
289
  # NOTE: X/Y changed to \frac{X}{Y} in dataset, but in simple cases fix in case the model output is X/Y
290
  # string = fix_a_slash_b(string)
 
 
291
  string = string.split("=")[-1]
292
+ while string.startswith("\\boxed{") and string.endswith("}"):
293
+ string = string[7:-1]
294
+ string = string.split("=")[-1]
295
  return string
296
 
297