Fix galactica equations (more)

This commit is contained in:
oobabooga 2023-01-07 12:13:09 -03:00
parent eeb63b1b8a
commit 62c4d9880b

View File

@ -63,6 +63,9 @@ def fix_gpt4chan(s):
def fix_galactica(s): def fix_galactica(s):
s = s.replace(r'\[', r'$') s = s.replace(r'\[', r'$')
s = s.replace(r'\]', r'$') s = s.replace(r'\]', r'$')
s = s.replace(r'\(', r'$')
s = s.replace(r'\)', r'$')
s = s.replace(r'$$', r'$')
return s return s
def generate_reply(question, temperature, max_length, inference_settings, selected_model): def generate_reply(question, temperature, max_length, inference_settings, selected_model):