Update app.py
Browse files
app.py
CHANGED
|
@@ -434,9 +434,13 @@ a[href*="api"], .api-button, #api-button {
|
|
| 434 |
width: 40%;
|
| 435 |
z-index: 9999;
|
| 436 |
|
| 437 |
-
|
|
|
|
|
|
|
| 438 |
overflow-y: auto;
|
|
|
|
| 439 |
}
|
|
|
|
| 440 |
#suggested_prompts_btn {
|
| 441 |
background: #D46BCA !important;
|
| 442 |
color: white !important;
|
|
@@ -501,12 +505,13 @@ with gr.Blocks(css=css) as demo:
|
|
| 501 |
show_prompts_btn = gr.Button("💡 Suggested Prompts", elem_id="suggested_prompts_btn")
|
| 502 |
|
| 503 |
with gr.Group(visible=False, elem_id="prompt_suggestions_box") as prompt_suggestions:
|
| 504 |
-
gr.
|
|
|
|
| 505 |
|
| 506 |
# theme_buttons = [gr.Button(theme, visible=False) for theme in man_prompts.keys()]
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
|
| 510 |
# theme_buttons.append(gr.Button(theme))
|
| 511 |
# prompt_buttons = []
|
| 512 |
# for s in suggestions:
|
|
|
|
| 434 |
width: 40%;
|
| 435 |
z-index: 9999;
|
| 436 |
|
| 437 |
+
}
|
| 438 |
+
.scrollable-prompts {
|
| 439 |
+
flex: 1;
|
| 440 |
overflow-y: auto;
|
| 441 |
+
padding: 10px;
|
| 442 |
}
|
| 443 |
+
|
| 444 |
#suggested_prompts_btn {
|
| 445 |
background: #D46BCA !important;
|
| 446 |
color: white !important;
|
|
|
|
| 505 |
show_prompts_btn = gr.Button("💡 Suggested Prompts", elem_id="suggested_prompts_btn")
|
| 506 |
|
| 507 |
with gr.Group(visible=False, elem_id="prompt_suggestions_box") as prompt_suggestions:
|
| 508 |
+
with gr.Column(elem_classes="scrollable-prompts"):
|
| 509 |
+
gr.Markdown("### Suggested Prompts")
|
| 510 |
|
| 511 |
# theme_buttons = [gr.Button(theme, visible=False) for theme in man_prompts.keys()]
|
| 512 |
+
for theme in man_prompts.keys(): # initially load man themes
|
| 513 |
+
btn = gr.Button(theme, visible=False)
|
| 514 |
+
theme_buttons.append(btn)
|
| 515 |
# theme_buttons.append(gr.Button(theme))
|
| 516 |
# prompt_buttons = []
|
| 517 |
# for s in suggestions:
|