diff --git a/ui/gradio_ui.py b/ui/gradio_ui.py index 1b5a423..b5edb92 100644 --- a/ui/gradio_ui.py +++ b/ui/gradio_ui.py @@ -15,6 +15,9 @@ class GenerateUI: """ def get_presets(self): + if not os.path.exists("local/presets.json"): + with open("local/presets.json", "w") as f: + f.write(orjson.dumps({})) with open("local/presets.json", "r") as f: return orjson.loads(f.read())