multimodalart HF Staff commited on
Commit
3cd2b63
·
verified ·
1 Parent(s): 7845e13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -19,11 +19,6 @@ pipe.to("cuda")
19
 
20
  @spaces.GPU
21
  def generate_image(prompt, negative_prompt, seed, randomize_seed, progress=gr.Progress(track_tqdm=True)):
22
- """
23
- Generates an image based on the provided prompt and negative prompt.
24
- Randomizes the seed if randomize_seed is True, otherwise uses the provided seed.
25
- Returns the generated image and the actual seed used, which will update the slider.
26
- """
27
  if randomize_seed:
28
  actual_seed = random.randint(0, 1000000)
29
  else:
@@ -80,7 +75,7 @@ with gr.Blocks() as demo:
80
  generate_button.click(
81
  fn=generate_image,
82
  inputs=[prompt_input, negative_prompt_input, seed_input, randomize_seed_checkbox],
83
- outputs=[output_image, seed_input] # Return both image and the actual seed back to the seed_input slider
84
  )
85
 
86
  if __name__ == "__main__":
 
19
 
20
  @spaces.GPU
21
  def generate_image(prompt, negative_prompt, seed, randomize_seed, progress=gr.Progress(track_tqdm=True)):
 
 
 
 
 
22
  if randomize_seed:
23
  actual_seed = random.randint(0, 1000000)
24
  else:
 
75
  generate_button.click(
76
  fn=generate_image,
77
  inputs=[prompt_input, negative_prompt_input, seed_input, randomize_seed_checkbox],
78
+ outputs=[output_image, seed_input]
79
  )
80
 
81
  if __name__ == "__main__":