hugforziio commited on
Commit
f334ecc
β€’
1 Parent(s): 5839265

save: prompt s/l

Browse files
Files changed (1) hide show
  1. app.py +17 -9
app.py CHANGED
@@ -255,17 +255,25 @@ with gradio.Blocks(title="ChatGPT", css=css) as demo:
255
  gradio.Markdown("**Prompt**")
256
  with gradio.Column(scale=12):
257
  with gradio.Row():
258
- prompt_title = gradio.Textbox(label='Prompt title (only for saving)')
259
- selected_saved_prompt_title = gradio.Dropdown(label='Select prompt from saved list')
 
 
260
  with gradio.Row():
261
- saved_prompts_refresh_btn = gradio.Button("♻️")
262
- saved_prompts_save_btn = gradio.Button("πŸ’Ύ")
263
- saved_prompts_delete_btn = gradio.Button("πŸ—‘")
264
- saved_prompts_list_refresh_btn = gradio.Button("πŸ”„")
265
- copy_prompt = gradio.Button("πŸ“‘")
266
- paste_prompt = gradio.Button("πŸ“‹")
 
 
 
 
 
 
267
  with gradio.Row():
268
- gradio.Markdown("""Buttons above: ♻️ : Load prompts from browser storage (but not updated into the list). πŸ’Ύ : Save current prompt to browser storage, overwrite the prompt with the same title (but not updated into the list). πŸ—‘ : Delete prompt with the same title from browser storage (but not updated into the list). πŸ”„ : Update the selector list. πŸ“‘ : Copy current prompt to clipboard. πŸ“‹ : Paste prompt from clipboard (need [permission](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText#browser_compatibility)).""")
269
  with gradio.Row():
270
  prompt_table = gradio.Dataframe(
271
  type='array',
 
255
  gradio.Markdown("**Prompt**")
256
  with gradio.Column(scale=12):
257
  with gradio.Row():
258
+ with gradio.Column(scale=6):
259
+ prompt_title = gradio.Textbox(label='Prompt title (only for saving)')
260
+ with gradio.Column(scale=6):
261
+ selected_saved_prompt_title = gradio.Dropdown(label='Select prompt from saved list (click ♻️ then πŸ”„)')
262
  with gradio.Row():
263
+ with gradio.Column(scale=1, min_width=100):
264
+ saved_prompts_refresh_btn = gradio.Button("♻️")
265
+ with gradio.Column(scale=1, min_width=100):
266
+ saved_prompts_save_btn = gradio.Button("πŸ’Ύ")
267
+ with gradio.Column(scale=1, min_width=100):
268
+ saved_prompts_delete_btn = gradio.Button("πŸ—‘")
269
+ with gradio.Column(scale=1, min_width=100):
270
+ saved_prompts_list_refresh_btn = gradio.Button("πŸ”„")
271
+ with gradio.Column(scale=1, min_width=100):
272
+ copy_prompt = gradio.Button("πŸ“‘")
273
+ with gradio.Column(scale=1, min_width=100):
274
+ paste_prompt = gradio.Button("πŸ“‹")
275
  with gradio.Row():
276
+ gradio.Markdown("""Buttons above: ♻️ then πŸ”„: Load prompts from browser storage. πŸ’Ύ then πŸ”„: Save current prompt to browser storage, overwrite the prompt with the same title. πŸ—‘ then πŸ”„: Delete prompt with the same title from browser storage. πŸ”„ : Update the selector list. πŸ“‘ : Copy current prompt to clipboard. πŸ“‹ : Paste prompt from clipboard (need [permission](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText#browser_compatibility)).""")
277
  with gradio.Row():
278
  prompt_table = gradio.Dataframe(
279
  type='array',