From 77f8f8958fb0e20b30172df12c2d77a26a567b5b Mon Sep 17 00:00:00 2001 From: Paillat Date: Thu, 29 Feb 2024 17:32:43 +0100 Subject: [PATCH] Fix write bytes not str --- ui/gradio_ui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/gradio_ui.py b/ui/gradio_ui.py index b5edb92..b07ec6a 100644 --- a/ui/gradio_ui.py +++ b/ui/gradio_ui.py @@ -16,7 +16,7 @@ class GenerateUI: def get_presets(self): if not os.path.exists("local/presets.json"): - with open("local/presets.json", "w") as f: + with open("local/presets.json", "wb") as f: f.write(orjson.dumps({})) with open("local/presets.json", "r") as f: return orjson.loads(f.read())