RageshAntony commited on
Commit
b4bf7d7
·
verified ·
1 Parent(s): 71c5d37
Files changed (1) hide show
  1. check_app.py +3 -3
check_app.py CHANGED
@@ -89,13 +89,13 @@ def generate_image_with_progress(pipe, prompt, num_steps, guidance_scale=None, s
89
  return image
90
 
91
  @spaces.GPU(duration=170)
92
- def create_pipeline_logic(prompt_text, model_name, config):
93
  print(f"starting {model_name}")
94
  progress = gr.Progress()
95
  num_steps = 30
96
  guidance_scale = 7.5 # Example guidance scale, can be adjusted per model
97
  seed = 42
98
-
99
  pipe_class = config["pipeline_class"]
100
  pipe = pipe_class.from_pretrained(
101
  config["repo_id"],
@@ -119,7 +119,7 @@ def main():
119
  output = gr.Textbox(label="Status")
120
  img = gr.Image(label=model_name, height=300)
121
 
122
- button.click(fn=create_pipeline_logic, inputs=[prompt_text, model_name, config], outputs=[output, img])
123
 
124
  app.launch()
125
 
 
89
  return image
90
 
91
  @spaces.GPU(duration=170)
92
+ def create_pipeline_logic(prompt_text, model_name):
93
  print(f"starting {model_name}")
94
  progress = gr.Progress()
95
  num_steps = 30
96
  guidance_scale = 7.5 # Example guidance scale, can be adjusted per model
97
  seed = 42
98
+ config = MODEL_CONFIGS[model_name]
99
  pipe_class = config["pipeline_class"]
100
  pipe = pipe_class.from_pretrained(
101
  config["repo_id"],
 
119
  output = gr.Textbox(label="Status")
120
  img = gr.Image(label=model_name, height=300)
121
 
122
+ button.click(fn=create_pipeline_logic, inputs=[prompt_text, gr.Text(value= model_name,visible=False)], outputs=[output, img])
123
 
124
  app.launch()
125