ChristopherMarais commited on
Commit
44a21c7
·
verified ·
1 Parent(s): a85fdee

Update app.py

Browse files

attempt to make example buttons row horizontal

Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -183,6 +183,14 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="sky")) as demo:
183
  # Insert custom CSS for layout:
184
  gr.HTML("""
185
  <style>
 
 
 
 
 
 
 
 
186
  /* Container for the input box and embedded send button */
187
  .input-container {
188
  position: relative;
@@ -253,7 +261,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="sky")) as demo:
253
  # ---------------------------
254
  # Example Inputs Row (clickable examples)
255
  # ---------------------------
256
- with gr.Row(visible=True) as examples_container:
257
  ex1 = gr.Button("Who?")
258
  ex2 = gr.Button("Where?")
259
  ex3 = gr.Button("What?")
 
183
  # Insert custom CSS for layout:
184
  gr.HTML("""
185
  <style>
186
+ .example-row {
187
+ display: flex;
188
+ flex-direction: row;
189
+ flex-wrap: wrap; /* Will wrap to vertical if there's not enough space */
190
+ justify-content: center; /* or flex-start, depending on your layout preference */
191
+ gap: 10px; /* optional: add spacing between buttons */
192
+ }
193
+
194
  /* Container for the input box and embedded send button */
195
  .input-container {
196
  position: relative;
 
261
  # ---------------------------
262
  # Example Inputs Row (clickable examples)
263
  # ---------------------------
264
+ with gr.Row(elem_classes="example-row", visible=True) as examples_container:
265
  ex1 = gr.Button("Who?")
266
  ex2 = gr.Button("Where?")
267
  ex3 = gr.Button("What?")