Spaces:
Running
Running
Update app.py
Browse files
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()
|
@@ -241,7 +241,6 @@ with gr.Blocks(css=css) as demo:
|
|
241 |
|
242 |
with gr.Row():
|
243 |
with gr.Column():
|
244 |
-
'''
|
245 |
exps = gr.Examples(
|
246 |
get_samples(),
|
247 |
inputs = text_prompt,
|
@@ -257,8 +256,9 @@ with gr.Blocks(css=css) as demo:
|
|
257 |
#exp_refresh = gr.Button(value="Click Refresh to get newly prompt examples")
|
258 |
#exp_refresh.click(get_samples, None, exps)
|
259 |
exps.select(lambda x: x[0], exps, text_prompt)
|
|
|
260 |
|
261 |
text_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
|
262 |
-
demo.load(get_params, None,
|
263 |
|
264 |
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
|
26 |
|
27 |
client = InferenceClient()
|
28 |
models = client.list_deployed_models()
|
|
|
241 |
|
242 |
with gr.Row():
|
243 |
with gr.Column():
|
|
|
244 |
exps = gr.Examples(
|
245 |
get_samples(),
|
246 |
inputs = text_prompt,
|
|
|
256 |
#exp_refresh = gr.Button(value="Click Refresh to get newly prompt examples")
|
257 |
#exp_refresh.click(get_samples, None, exps)
|
258 |
exps.select(lambda x: x[0], exps, text_prompt)
|
259 |
+
'''
|
260 |
|
261 |
text_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
|
262 |
+
demo.load(get_params, None, current_model)
|
263 |
|
264 |
demo.launch(show_api=False)
|