Yntec commited on
Commit
326e96a
β€’
1 Parent(s): e5168fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -47,6 +47,7 @@ with gr.Blocks() as demo:
47
  model_choice2 = gr.Dropdown(models, label = 'Choose a model from the 686 available!', value = models[0], filterable = False)
48
  txt_input2 = gr.Textbox(label = 'Your prompt:')
49
 
 
50
  max_images = 6
51
 
52
  gen_button2 = gr.Button('Generate up to 6 images in up to 3 minutes total')
@@ -67,9 +68,7 @@ with gr.Blocks() as demo:
67
  )
68
 
69
  with gr.Column():
70
- num_images = gr.Slider(1, max_images, value = 1, step = 1, label = 'Number of images')
71
- img_i = gr.Number(1, visible = False)
72
- num_images.change(lambda 1, n: gr.update(visible = (i < n)), [img_i, num_images], o, show_progress = False)
73
  output2 = [gr.Image(label = '') for _ in range(6)]
74
  for i, o in enumerate(output2):
75
  num_models = num_images
 
47
  model_choice2 = gr.Dropdown(models, label = 'Choose a model from the 686 available!', value = models[0], filterable = False)
48
  txt_input2 = gr.Textbox(label = 'Your prompt:')
49
 
50
+ current_images = 1
51
  max_images = 6
52
 
53
  gen_button2 = gr.Button('Generate up to 6 images in up to 3 minutes total')
 
68
  )
69
 
70
  with gr.Column():
71
+ num_images = gr.Slider(current_images, max_images, value = 1, step = 1, label = 'Number of images')
 
 
72
  output2 = [gr.Image(label = '') for _ in range(6)]
73
  for i, o in enumerate(output2):
74
  num_models = num_images