KingNish commited on
Commit
23fd89e
1 Parent(s): 97d3c4e

Back to default

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -23,7 +23,7 @@ torch.cuda.empty_cache()
23
 
24
  # Inference function
25
  @spaces.GPU(duration=25)
26
- def generate_image(prompt, seed=42, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT, num_inference_steps=DEFAULT_INFERENCE_STEPS, randomize_seed=False):
27
 
28
  if randomize_seed:
29
  seed = random.randint(0, MAX_SEED)
@@ -108,7 +108,7 @@ with gr.Blocks() as demo:
108
  gr.on(
109
  triggers=[prompt.input, width.input, height.input, num_inference_steps.input],
110
  fn=generate_image,
111
- inputs=[prompt, seed, width, height, num_inference_steps, randomize_seed],
112
  outputs=[result, seed, latency],
113
  show_progress="hidden",
114
  show_api=False,
@@ -117,4 +117,4 @@ with gr.Blocks() as demo:
117
  )
118
 
119
  # Launch the app
120
- demo.launch()
 
23
 
24
  # Inference function
25
  @spaces.GPU(duration=25)
26
+ def generate_image(prompt, seed=42, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT, randomize_seed=False, num_inference_steps=DEFAULT_INFERENCE_STEPS):
27
 
28
  if randomize_seed:
29
  seed = random.randint(0, MAX_SEED)
 
108
  gr.on(
109
  triggers=[prompt.input, width.input, height.input, num_inference_steps.input],
110
  fn=generate_image,
111
+ inputs=[prompt, seed, width, height, randomize_seed, num_inference_steps],
112
  outputs=[result, seed, latency],
113
  show_progress="hidden",
114
  show_api=False,
 
117
  )
118
 
119
  # Launch the app
120
+ demo.launch()