mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-01-12 13:27:38 +01:00
Minor formatting changes
This commit is contained in:
parent
2f16d0afca
commit
cb169d0834
@ -63,8 +63,6 @@ def generate_softprompt_input_tensors(input_ids):
|
|||||||
return inputs_embeds, filler_input_ids
|
return inputs_embeds, filler_input_ids
|
||||||
|
|
||||||
# Removes empty replies from gpt4chan outputs
|
# Removes empty replies from gpt4chan outputs
|
||||||
|
|
||||||
|
|
||||||
def fix_gpt4chan(s):
|
def fix_gpt4chan(s):
|
||||||
for i in range(10):
|
for i in range(10):
|
||||||
s = re.sub("--- [0-9]*\n>>[0-9]*\n---", "---", s)
|
s = re.sub("--- [0-9]*\n>>[0-9]*\n---", "---", s)
|
||||||
@ -73,8 +71,6 @@ def fix_gpt4chan(s):
|
|||||||
return s
|
return s
|
||||||
|
|
||||||
# Fix the LaTeX equations in galactica
|
# Fix the LaTeX equations in galactica
|
||||||
|
|
||||||
|
|
||||||
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'$')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user