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