Dhruv Diddi commited on
Commit
a7de0ac
·
1 Parent(s): 8309c56

feat: add occasion dropdown

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -16,13 +16,16 @@ def fake_gan():
16
  "https://images.unsplash.com/photo-1601412436009-d964bd02edbc?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=464&q=80",
17
  ]
18
  ), f"label {i}" if i != 0 else "label" * 50)
19
- for i in range(3)
20
  ]
21
  return images
22
 
23
 
24
  with gr.Blocks() as demo:
25
  with gr.Column(variant="panel"):
 
 
 
26
  with gr.Row(variant="compact"):
27
  text = gr.Textbox(
28
  label="Enter your prompt",
@@ -36,7 +39,7 @@ with gr.Blocks() as demo:
36
 
37
  gallery = gr.Gallery(
38
  label="Generated images", show_label=False, elem_id="gallery"
39
- ).style(columns=[2], rows=[2], object_fit="contain", height="auto")
40
 
41
  btn.click(fake_gan, None, gallery)
42
 
 
16
  "https://images.unsplash.com/photo-1601412436009-d964bd02edbc?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=464&q=80",
17
  ]
18
  ), f"label {i}" if i != 0 else "label" * 50)
19
+ for i in range(2)
20
  ]
21
  return images
22
 
23
 
24
  with gr.Blocks() as demo:
25
  with gr.Column(variant="panel"):
26
+ gr.Dropdown(
27
+ ["Happy Birthday", "Happy Anniversary", "Congratulations"], label="Choose Occasions", info="More incoming!"
28
+ ),
29
  with gr.Row(variant="compact"):
30
  text = gr.Textbox(
31
  label="Enter your prompt",
 
39
 
40
  gallery = gr.Gallery(
41
  label="Generated images", show_label=False, elem_id="gallery"
42
+ ).style(columns=[2], rows=[1], object_fit="contain", height="auto")
43
 
44
  btn.click(fake_gan, None, gallery)
45