Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -426,7 +426,7 @@ def get_prompts(prompt_text):
|
|
426 |
return gen
|
427 |
|
428 |
def gen_im(prompt,model_choice,count=1):
|
429 |
-
out = im_gen(prompt,model_choice,count)
|
430 |
return out
|
431 |
|
432 |
|
@@ -472,7 +472,10 @@ with gr.Blocks() as build_app:
|
|
472 |
#gen_im = gr.Button("Generate Image")
|
473 |
with gr.Accordion("Generated Image Controls", open=False):
|
474 |
prompt_input=gr.Textbox("Seed Prompt", placeholder="Optional")
|
475 |
-
|
|
|
|
|
|
|
476 |
with gr.Row():
|
477 |
magic_btn=gr.Button("Magic Prompt")
|
478 |
gen_btn=gr.Button("Generate Images")
|
@@ -489,7 +492,7 @@ with gr.Blocks() as build_app:
|
|
489 |
gr.Column(scale=1)
|
490 |
|
491 |
magic_btn.click(get_prompts,prompt_input,prompt_input)
|
492 |
-
gen_btn.click(gen_im,[prompt_input,model_name1],gen_im_out)
|
493 |
|
494 |
t_image.change(up_c,[t_image,c_slider],c_image)
|
495 |
c_upbtn.click(slide_fn,c_slider,c_image)
|
|
|
426 |
return gen
|
427 |
|
428 |
def gen_im(prompt,model_choice,count=1):
|
429 |
+
out = im_gen(prompt,int(model_choice),count)
|
430 |
return out
|
431 |
|
432 |
|
|
|
472 |
#gen_im = gr.Button("Generate Image")
|
473 |
with gr.Accordion("Generated Image Controls", open=False):
|
474 |
prompt_input=gr.Textbox("Seed Prompt", placeholder="Optional")
|
475 |
+
with gr.Row():
|
476 |
+
model_name1 = gr.Dropdown(show_label=False, choices=[m for m in models], type="index", value=current_model, interactive=True)
|
477 |
+
count = gr.Number(value=1)
|
478 |
+
|
479 |
with gr.Row():
|
480 |
magic_btn=gr.Button("Magic Prompt")
|
481 |
gen_btn=gr.Button("Generate Images")
|
|
|
492 |
gr.Column(scale=1)
|
493 |
|
494 |
magic_btn.click(get_prompts,prompt_input,prompt_input)
|
495 |
+
gen_btn.click(gen_im,[prompt_input,model_name1,count],gen_im_out)
|
496 |
|
497 |
t_image.change(up_c,[t_image,c_slider],c_image)
|
498 |
c_upbtn.click(slide_fn,c_slider,c_image)
|