LeeveWasTaken commited on
Commit
3ce1851
1 Parent(s): 0ebfb39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -24,7 +24,7 @@ def extend_choices(choices):
24
 
25
  def update_imgbox(choices):
26
  choices_plus = extend_choices(choices)
27
- return [gr.Image(None, label = m, visible = (m != 'NA')) for m in choices_plus]
28
 
29
  def gen_fn(model_str, prompt, negative_prompt=None, image_style="Default"):
30
  if model_str == 'NA':
@@ -37,12 +37,13 @@ def gen_fn(model_str, prompt, negative_prompt=None, image_style="Default"):
37
  with gr.Blocks() as demo:
38
  with gr.Tab('The Dream'):
39
  txt_input = gr.Textbox(label='Your prompt:', lines=4)
40
- neg_prompt = gr.Textbox(label='Negative prompt (Optional):', placeholder='Enter undesirable attributes here', lines=2)
41
- image_style = gr.Dropdown(label='Select Style', choices=["Default", "Cinematic", "Digital Art", "Portrait"], value="Default")
42
-
43
  gen_button = gr.Button('Generate up to 6 images in up to 1 minutes total')
44
  stop_button = gr.Button('Stop', variant='secondary', interactive=False)
45
 
 
 
 
 
46
  gen_button.click(lambda s: gr.update(interactive=True), None, stop_button)
47
  gr.HTML(
48
  """
@@ -55,7 +56,7 @@ with gr.Blocks() as demo:
55
  </div>
56
  </div>
57
  """
58
- )
59
 
60
  with gr.Row():
61
  output = [gr.Image(label=m, min_width=480) for m in default_models]
 
24
 
25
  def update_imgbox(choices):
26
  choices_plus = extend_choices(choices)
27
+ return [gr.Image(None, label=m, visible=(m != 'NA')) for m in choices_plus]
28
 
29
  def gen_fn(model_str, prompt, negative_prompt=None, image_style="Default"):
30
  if model_str == 'NA':
 
37
  with gr.Blocks() as demo:
38
  with gr.Tab('The Dream'):
39
  txt_input = gr.Textbox(label='Your prompt:', lines=4)
 
 
 
40
  gen_button = gr.Button('Generate up to 6 images in up to 1 minutes total')
41
  stop_button = gr.Button('Stop', variant='secondary', interactive=False)
42
 
43
+ with gr.Accordion("Advanced Settings", open=False) as advanced_settings:
44
+ neg_prompt = gr.Textbox(label='Negative prompt (Optional):', placeholder='Enter undesirable attributes here', lines=2)
45
+ image_style = gr.Dropdown(label='Select Style', choices=["Default", "Cinematic", "Digital Art", "Portrait"], value="Default")
46
+
47
  gen_button.click(lambda s: gr.update(interactive=True), None, stop_button)
48
  gr.HTML(
49
  """
 
56
  </div>
57
  </div>
58
  """
59
+ )
60
 
61
  with gr.Row():
62
  output = [gr.Image(label=m, min_width=480) for m in default_models]