Spaces:
Running
Running
app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def update_imgbox(choices):
|
|
28 |
def gen_fn(model_str, prompt):
|
29 |
if model_str == 'NA':
|
30 |
return None
|
31 |
-
noise = str(randint(0,
|
32 |
return models_load[model_str](f'{prompt} {noise}')
|
33 |
|
34 |
def make_me():
|
@@ -49,7 +49,7 @@ def make_me():
|
|
49 |
stop_button.click(on_stop_click, inputs=None, outputs=[gen_button, stop_button])
|
50 |
|
51 |
with gr.Row():
|
52 |
-
output = [gr.Image(label=m, min_width=250, height=250, elem_id="custom_image") for m in default_models]
|
53 |
current_models = [gr.Textbox(m, visible=False) for m in default_models]
|
54 |
for m, o in zip(current_models, output):
|
55 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
|
|
28 |
def gen_fn(model_str, prompt):
|
29 |
if model_str == 'NA':
|
30 |
return None
|
31 |
+
noise = str(randint(0, 99999999))
|
32 |
return models_load[model_str](f'{prompt} {noise}')
|
33 |
|
34 |
def make_me():
|
|
|
49 |
stop_button.click(on_stop_click, inputs=None, outputs=[gen_button, stop_button])
|
50 |
|
51 |
with gr.Row():
|
52 |
+
output = [gr.Image(label=m, min_width=250, height=250, elem_id="custom_image", show_label=True, interactive=False, show_share_button=False) for m in default_models]
|
53 |
current_models = [gr.Textbox(m, visible=False) for m in default_models]
|
54 |
for m, o in zip(current_models, output):
|
55 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|