mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 09:40:20 +01:00
Fix a bug
This commit is contained in:
parent
9d3c6d2dc3
commit
a2127239de
@ -193,7 +193,6 @@ def generate_reply(question, state, eos_token=None, stopping_strings=[]):
|
||||
|
||||
# Handling the stopping strings
|
||||
stopping_criteria_list = transformers.StoppingCriteriaList()
|
||||
print(ast.literal_eval(f"[{state['custom_stopping_strings']}]"))
|
||||
for st in (stopping_strings, ast.literal_eval(f"[{state['custom_stopping_strings']}]")):
|
||||
if type(st) is list and len(st) > 0:
|
||||
sentinel_token_ids = [encode(string, add_special_tokens=False) for string in st]
|
||||
|
Loading…
Reference in New Issue
Block a user