From 90141bc1a804ff5b0e988753832e3c4b4cc6923e Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:08:54 -0300 Subject: [PATCH] Fix saving prompts on Windows --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index 846ea9d..5bcb2cb 100644 --- a/server.py +++ b/server.py @@ -139,7 +139,7 @@ def create_model_and_preset_menus(): ui.create_refresh_button(shared.gradio['preset_menu'], lambda : None, lambda : {'choices': get_available_presets()}, 'refresh-button') def save_prompt(text): - fname = f"{datetime.now().strftime('%Y-%m-%d-%H:%M:%S')}.txt" + fname = f"{datetime.now().strftime('%Y-%m-%d-%H%M%S')}.txt" with open(Path(f'prompts/{fname}'), 'w', encoding='utf-8') as f: f.write(text) return f"Saved to prompts/{fname}"