mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-23 00:18:20 +01:00
Fix newlines in exported character yamls
This commit is contained in:
parent
d06c34dea5
commit
7de7b3d495
@ -598,7 +598,7 @@ def check_tavern_character(img):
|
|||||||
if "chara" not in img.info:
|
if "chara" not in img.info:
|
||||||
return "Not a TavernAI card", None, None, gr.update(interactive=False)
|
return "Not a TavernAI card", None, None, gr.update(interactive=False)
|
||||||
|
|
||||||
decoded_string = base64.b64decode(img.info['chara'])
|
decoded_string = base64.b64decode(img.info['chara']).replace(b'\\r\\n', b'\\n')
|
||||||
_json = json.loads(decoded_string)
|
_json = json.loads(decoded_string)
|
||||||
if "data" in _json:
|
if "data" in _json:
|
||||||
_json = _json["data"]
|
_json = _json["data"]
|
||||||
|
Loading…
Reference in New Issue
Block a user