Update app.py
Browse files
app.py
CHANGED
@@ -32,8 +32,8 @@ num_models = 9
|
|
32 |
|
33 |
default_models = models[:num_models]
|
34 |
inference_timeout = 600
|
35 |
-
MAX_SEED=
|
36 |
-
starting_seed = randint(
|
37 |
|
38 |
def extend_choices(choices):
|
39 |
return choices[:num_models] + (num_models - len(choices[:num_models])) * ['NA']
|
@@ -86,7 +86,7 @@ with gr.Blocks(theme='Yntec/HaleyCH_Theme_Orange') as demo:
|
|
86 |
txt_input = gr.Textbox(label='Your prompt:', lines=4)
|
87 |
gen_button = gr.Button('Generate up to 9 images in up to 3 minutes total')
|
88 |
with gr.Row():
|
89 |
-
seed = gr.Slider(label="Use a seed to replicate the same image later (maximum
|
90 |
seed_rand = gr.Button("Randomize Seed 🎲", size="sm", variant="secondary", scale=1)
|
91 |
seed_rand.click(randomize_seed, None, [seed], queue=False)
|
92 |
#stop_button = gr.Button('Stop', variant = 'secondary', interactive = False)
|
|
|
32 |
|
33 |
default_models = models[:num_models]
|
34 |
inference_timeout = 600
|
35 |
+
MAX_SEED=666666666
|
36 |
+
starting_seed = randint(666666000, 666666666)
|
37 |
|
38 |
def extend_choices(choices):
|
39 |
return choices[:num_models] + (num_models - len(choices[:num_models])) * ['NA']
|
|
|
86 |
txt_input = gr.Textbox(label='Your prompt:', lines=4)
|
87 |
gen_button = gr.Button('Generate up to 9 images in up to 3 minutes total')
|
88 |
with gr.Row():
|
89 |
+
seed = gr.Slider(label="Use a seed to replicate the same image later (maximum 666666666)", minimum=0, maximum=MAX_SEED, step=1, value=starting_seed, scale=3)
|
90 |
seed_rand = gr.Button("Randomize Seed 🎲", size="sm", variant="secondary", scale=1)
|
91 |
seed_rand.click(randomize_seed, None, [seed], queue=False)
|
92 |
#stop_button = gr.Button('Stop', variant = 'secondary', interactive = False)
|