Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ preSetPrompt = "High fashion studio foto shoot. tall slender 18+ caucasian woman
|
|
10 |
negPreSetPrompt = "[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry, text, fuzziness"
|
11 |
|
12 |
lock = RLock()
|
|
|
13 |
HF_TOKEN = os.environ.get("HF_TOKEN") if os.environ.get("HF_TOKEN") else None # If private or gated models aren't used, ENV setting is unnecessary.
|
14 |
|
15 |
def get_current_time():
|
@@ -34,8 +35,8 @@ def load_fn(models):
|
|
34 |
load_fn(models)
|
35 |
|
36 |
|
37 |
-
num_models =
|
38 |
-
max_images =
|
39 |
inference_timeout = 400
|
40 |
default_models = models[:num_models]
|
41 |
MAX_SEED = 2**32-1
|
@@ -230,7 +231,7 @@ with gr.Blocks(fill_width=True, head=js) as demo:
|
|
230 |
seed2 = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1)
|
231 |
seed_rand2 = gr.Button("Randomize Seed", size="sm", variant="secondary")
|
232 |
seed_rand2.click(randomize_seed, None, [seed2], queue=False)
|
233 |
-
num_images = gr.Slider(1, max_images, value=max_images, step=1, label='Number of images')
|
234 |
with gr.Row():
|
235 |
gen_button2 = gr.Button('Let the machine halucinate', variant='primary', scale=2)
|
236 |
#stop_button2 = gr.Button('Stop', variant='stop', interactive=False, scale=1)
|
|
|
10 |
negPreSetPrompt = "[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry, text, fuzziness"
|
11 |
|
12 |
lock = RLock()
|
13 |
+
|
14 |
HF_TOKEN = os.environ.get("HF_TOKEN") if os.environ.get("HF_TOKEN") else None # If private or gated models aren't used, ENV setting is unnecessary.
|
15 |
|
16 |
def get_current_time():
|
|
|
35 |
load_fn(models)
|
36 |
|
37 |
|
38 |
+
num_models = 12
|
39 |
+
max_images = 12
|
40 |
inference_timeout = 400
|
41 |
default_models = models[:num_models]
|
42 |
MAX_SEED = 2**32-1
|
|
|
231 |
seed2 = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1)
|
232 |
seed_rand2 = gr.Button("Randomize Seed", size="sm", variant="secondary")
|
233 |
seed_rand2.click(randomize_seed, None, [seed2], queue=False)
|
234 |
+
num_images = gr.Slider(1, max_images / 2, value=max_images, step=1, label='Number of images')
|
235 |
with gr.Row():
|
236 |
gen_button2 = gr.Button('Let the machine halucinate', variant='primary', scale=2)
|
237 |
#stop_button2 = gr.Button('Stop', variant='stop', interactive=False, scale=1)
|