Spaces:
Running
on
T4
Running
on
T4
Krebzonide
commited on
Commit
·
5f1159f
1
Parent(s):
552c858
Update app.py
Browse files
app.py
CHANGED
@@ -69,25 +69,6 @@ def set_base_model(base_model_id):
|
|
69 |
pipe.to("cuda")
|
70 |
return pipe
|
71 |
|
72 |
-
examples = [
|
73 |
-
['A group of 4 students from University of Wisconsin Stout sitting at a table talking, men and women, detailed faces, focused',
|
74 |
-
'glitch, deformed, cross-eyed'],
|
75 |
-
['A serious capybara at work, wearing a suit',
|
76 |
-
'low quality'],
|
77 |
-
['a graffiti of a robot serving meals to people',
|
78 |
-
'low quality'],
|
79 |
-
['photo of a small cozy modern house in red woods on a mountain, solar panels, garage, driveway, great view, sunshine',
|
80 |
-
'red house'],
|
81 |
-
['cinematic photo of a woman sitting at a cafe, 35mm photograph, film, bokeh, professional, 4k, detailed face',
|
82 |
-
'drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly'],
|
83 |
-
['analog film photo of old woman on the streets of london, faded film, desaturated, 35mm photo, grainy, vignette, vintage, Kodachrome, Lomography, stained, highly detailed, found footage',
|
84 |
-
'painting, drawing, illustration, glitch, deformed, mutated, cross-eyed, ugly, disfigured']#,
|
85 |
-
#['nude photo of a 20 year old model in the back seat of a car, detailed face',
|
86 |
-
#'big boobs'],
|
87 |
-
#['nude photo of a 20 year old man, penis and testicles, dick and balls, erection',
|
88 |
-
#'woman']
|
89 |
-
]
|
90 |
-
|
91 |
with gr.Blocks(css=css) as demo:
|
92 |
with gr.Column():
|
93 |
prompt = gr.Textbox(label="Prompt")
|
@@ -96,9 +77,9 @@ with gr.Blocks(css=css) as demo:
|
|
96 |
samp_steps = gr.Slider(1, 30, value=10, step=1, label="Sampling steps")
|
97 |
batch_size = gr.Slider(1, 6, value=1, step=1, label="Batch size", interactive=True)
|
98 |
seed = gr.Number(label="Seed", value=-1, minimum=-1, precision=0)
|
|
|
99 |
gallery = gr.Gallery(show_label=False, preview=True, container=False)
|
100 |
with gr.Row():
|
101 |
-
lastSeed = gr.Number(label="Last Seed", value=-1, interactive=False)
|
102 |
submit_btn.click(generate, [prompt, samp_steps, batch_size, seed], [gallery, lastSeed], queue=True)
|
103 |
|
104 |
pipe = set_base_model(model_id)
|
|
|
69 |
pipe.to("cuda")
|
70 |
return pipe
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
with gr.Blocks(css=css) as demo:
|
73 |
with gr.Column():
|
74 |
prompt = gr.Textbox(label="Prompt")
|
|
|
77 |
samp_steps = gr.Slider(1, 30, value=10, step=1, label="Sampling steps")
|
78 |
batch_size = gr.Slider(1, 6, value=1, step=1, label="Batch size", interactive=True)
|
79 |
seed = gr.Number(label="Seed", value=-1, minimum=-1, precision=0)
|
80 |
+
lastSeed = gr.Number(label="Last Seed", value=-1, interactive=False)
|
81 |
gallery = gr.Gallery(show_label=False, preview=True, container=False)
|
82 |
with gr.Row():
|
|
|
83 |
submit_btn.click(generate, [prompt, samp_steps, batch_size, seed], [gallery, lastSeed], queue=True)
|
84 |
|
85 |
pipe = set_base_model(model_id)
|