RageshAntony commited on
Commit
499951f
·
verified ·
1 Parent(s): 226c832

added inputs for addl params

Browse files
Files changed (1) hide show
  1. check_app.py +9 -3
check_app.py CHANGED
@@ -176,7 +176,7 @@ def generate_image_with_progress(model_name,pipe, prompt, num_steps, guidance_sc
176
  return image
177
 
178
  @spaces.GPU(duration=170)
179
- def create_pipeline_logic(prompt_text, model_name):
180
  print(f"starting {model_name}")
181
  progress = gr.Progress(track_tqdm=True)
182
  num_steps = 30
@@ -222,7 +222,7 @@ def main():
222
  label="Seed",
223
  minimum=0,
224
  maximum=MAX_SEED,
225
- step=1,
226
  value=0,
227
  )
228
 
@@ -266,7 +266,13 @@ def main():
266
  output = gr.Textbox(label="Status")
267
  img = gr.Image(label=model_name, height=300)
268
 
269
- button.click(fn=create_pipeline_logic, inputs=[prompt_text, gr.Text(value= model_name,visible=False)], outputs=[output, img])
 
 
 
 
 
 
270
 
271
  app.launch()
272
 
 
176
  return image
177
 
178
  @spaces.GPU(duration=170)
179
+ def create_pipeline_logic(prompt_text, model_name, negative_prompt="", seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=4.5, num_inference_steps=40,):
180
  print(f"starting {model_name}")
181
  progress = gr.Progress(track_tqdm=True)
182
  num_steps = 30
 
222
  label="Seed",
223
  minimum=0,
224
  maximum=MAX_SEED,
225
+ step=100,
226
  value=0,
227
  )
228
 
 
266
  output = gr.Textbox(label="Status")
267
  img = gr.Image(label=model_name, height=300)
268
 
269
+ button.click(fn=create_pipeline_logic, inputs=[prompt_text, gr.Text(value= model_name,visible=False), negative_prompt,
270
+ seed,
271
+ randomize_seed,
272
+ width,
273
+ height,
274
+ guidance_scale,
275
+ num_inference_steps], outputs=[output, img])
276
 
277
  app.launch()
278