Spaces:
Running
Running
Commit
Β·
f334ecc
1
Parent(s):
5839265
save: prompt s/l
Browse files
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 |
-
|
| 259 |
-
|
|
|
|
|
|
|
| 260 |
with gradio.Row():
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
with gradio.Row():
|
| 268 |
-
gradio.Markdown("""Buttons above: β»οΈ
|
| 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',
|