mirror of
https://github.com/Paillat-dev/viralfactory.git
synced 2026-01-02 01:06:19 +00:00
Create presets file if not exists
This commit is contained in:
@@ -15,6 +15,9 @@ class GenerateUI:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def get_presets(self):
|
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:
|
with open("local/presets.json", "r") as f:
|
||||||
return orjson.loads(f.read())
|
return orjson.loads(f.read())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user