text-generation-webui/extensions/example/script.py
oobabooga 6b5dcd46c5 Add support for extensions
This is experimental.
2023-01-27 00:40:39 -03:00

14 lines
305 B
Python

def input_modifier(string):
"""
This function is applied to your text inputs before
they are fed into the model.
"""
return string.replace(' ', '#')
def output_modifier(string):
"""
This function is applied to the model outputs.
"""
return string.replace(' ', '_')