fix for (I assume) some inconsistency with gradio sometimes-but-not-all-the-time coercing an empty Textbox into an empty string or sometimes None, but I also assume that might be a deserialization issue from JSON (cannot be assed to ask people to screenshot UI or send their ./config/generation.json for analysis, so get this hot monkeyshit patch)
This commit is contained in:
parent
ec550d74fd
commit
ae5d4023aa
|
@ -226,10 +226,13 @@ def generate(
|
|||
'cvvp_amount': cvvp_weight,
|
||||
}
|
||||
|
||||
if delimiter is None:
|
||||
delimiter = ""
|
||||
|
||||
if delimiter == "\\n":
|
||||
delimiter = "\n"
|
||||
|
||||
if delimiter != "" and delimiter in text:
|
||||
if delimiter and delimiter != "" and delimiter in text:
|
||||
texts = text.split(delimiter)
|
||||
else:
|
||||
texts = split_and_recombine_text(text)
|
||||
|
@ -353,7 +356,7 @@ def generate(
|
|||
|
||||
info = {
|
||||
'text': text,
|
||||
'delimiter': '\\n' if delimiter == "\n" else delimiter,
|
||||
'delimiter': '\\n' if delimiter and delimiter == "\n" else delimiter,
|
||||
'emotion': emotion,
|
||||
'prompt': prompt,
|
||||
'voice': voice,
|
||||
|
|
Loading…
Reference in New Issue
Block a user