Make settings work

This commit is contained in:
somebody
2022-12-27 00:13:54 -06:00
parent 17eaae81dc
commit 901322b66b
5 changed files with 132 additions and 29 deletions

View File

@@ -9096,7 +9096,10 @@ def UI_2_set_commentator_image(commentator_id):
@app.route("/image_db.json", methods=["GET"])
@logger.catch
def UI_2_get_image_db():
return send_file(os.path.join(koboldai_vars.save_paths.generated_images, "db.json"))
try:
return send_file(os.path.join(koboldai_vars.save_paths.generated_images, "db.json"))
except FileNotFoundError:
return jsonify([])
@app.route("/generated_images/<path:path>")
def UI_2_send_generated_images(path):