mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-23 00:18:20 +01:00
Small change
This commit is contained in:
parent
aeb1b7a9c5
commit
fd743a0207
@ -132,9 +132,11 @@ def save_prompt(text, fname):
|
|||||||
with open(Path(f'prompts/{fname}.txt'), 'w', encoding='utf-8') as f:
|
with open(Path(f'prompts/{fname}.txt'), 'w', encoding='utf-8') as f:
|
||||||
f.write(text)
|
f.write(text)
|
||||||
|
|
||||||
return f"Saved to prompts/{fname}.txt", gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)
|
message = f"Saved to prompts/{fname}.txt"
|
||||||
else:
|
else:
|
||||||
return "Error: No prompt name given.", gr.update(visible=True), gr.update(visible=False), gr.update(visible=True)
|
message = "Error: No prompt name given."
|
||||||
|
|
||||||
|
return message, gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)
|
||||||
|
|
||||||
|
|
||||||
def load_prompt(fname):
|
def load_prompt(fname):
|
||||||
|
Loading…
Reference in New Issue
Block a user