svjack commited on
Commit
fd582ec
1 Parent(s): 183b6f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -22,7 +22,7 @@ def get_params(request: gr.Request):
22
  client = InferenceClient()
23
  models = client.list_deployed_models()
24
  list_models = models["text-to-image"]
25
- return list_models
26
 
27
  client = InferenceClient()
28
  models = client.list_deployed_models()
@@ -257,6 +257,6 @@ with gr.Blocks(css=css) as demo:
257
  text_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
258
  select_button.click(generate_txt2img, inputs=[current_model, select_prompt, negative_prompt, image_style], outputs=image_output)
259
 
260
- demo.load(get_params, None, current_model)
261
 
262
  demo.launch(show_api=False)
 
22
  client = InferenceClient()
23
  models = client.list_deployed_models()
24
  list_models = models["text-to-image"]
25
+ return list_models, get_samples()
26
 
27
  client = InferenceClient()
28
  models = client.list_deployed_models()
 
257
  text_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
258
  select_button.click(generate_txt2img, inputs=[current_model, select_prompt, negative_prompt, image_style], outputs=image_output)
259
 
260
+ demo.load(get_params, None, [current_model, select_prompt])
261
 
262
  demo.launch(show_api=False)