Spaces:
Paused
Paused
Roman Baenro
commited on
Commit
·
2a9a831
1
Parent(s):
48a2d89
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ if prodia_key is None:
|
|
14 |
exit()
|
15 |
client = prodia.Client(api_key=prodia_key)
|
16 |
|
17 |
-
def process_input_text2img(prompt, negative_prompt, steps, cfg_scale, number, seed, model, sampler, aspect_ratio, upscale, save):
|
18 |
images = []
|
19 |
for image in range(number):
|
20 |
result = client.txt2img(prompt=prompt, negative_prompt=negative_prompt, model=model, sampler=sampler,
|
@@ -82,7 +82,6 @@ with gr.Blocks() as demo:
|
|
82 |
ar = gr.Radio(label="Aspect Ratio", choices=["square", "portrait", "landscape"], value="square", interactive=True)
|
83 |
with gr.Column():
|
84 |
upscale = gr.Checkbox(label="upscale", interactive=True)
|
85 |
-
save = gr.Checkbox(label="auto save", interactive=True)
|
86 |
|
87 |
with gr.Row():
|
88 |
run_btn = gr.Button("Run", variant="primary")
|
@@ -100,8 +99,7 @@ with gr.Blocks() as demo:
|
|
100 |
model,
|
101 |
sampler,
|
102 |
ar,
|
103 |
-
upscale
|
104 |
-
save
|
105 |
],
|
106 |
outputs=[result_image],
|
107 |
)
|
@@ -138,7 +136,6 @@ with gr.Blocks() as demo:
|
|
138 |
run_btn = gr.Button("Run", variant="primary")
|
139 |
with gr.Column():
|
140 |
result_image = gr.Gallery(label="Result Image(s)")
|
141 |
-
save=False
|
142 |
run_btn.click(
|
143 |
process_input_img2img,
|
144 |
inputs=[
|
@@ -152,8 +149,7 @@ with gr.Blocks() as demo:
|
|
152 |
model,
|
153 |
sampler,
|
154 |
ds,
|
155 |
-
upscale
|
156 |
-
save
|
157 |
],
|
158 |
outputs=[result_image],
|
159 |
)
|
|
|
14 |
exit()
|
15 |
client = prodia.Client(api_key=prodia_key)
|
16 |
|
17 |
+
def process_input_text2img(prompt, negative_prompt, steps, cfg_scale, number, seed, model, sampler, aspect_ratio, upscale, save=False):
|
18 |
images = []
|
19 |
for image in range(number):
|
20 |
result = client.txt2img(prompt=prompt, negative_prompt=negative_prompt, model=model, sampler=sampler,
|
|
|
82 |
ar = gr.Radio(label="Aspect Ratio", choices=["square", "portrait", "landscape"], value="square", interactive=True)
|
83 |
with gr.Column():
|
84 |
upscale = gr.Checkbox(label="upscale", interactive=True)
|
|
|
85 |
|
86 |
with gr.Row():
|
87 |
run_btn = gr.Button("Run", variant="primary")
|
|
|
99 |
model,
|
100 |
sampler,
|
101 |
ar,
|
102 |
+
upscale
|
|
|
103 |
],
|
104 |
outputs=[result_image],
|
105 |
)
|
|
|
136 |
run_btn = gr.Button("Run", variant="primary")
|
137 |
with gr.Column():
|
138 |
result_image = gr.Gallery(label="Result Image(s)")
|
|
|
139 |
run_btn.click(
|
140 |
process_input_img2img,
|
141 |
inputs=[
|
|
|
149 |
model,
|
150 |
sampler,
|
151 |
ds,
|
152 |
+
upscale
|
|
|
153 |
],
|
154 |
outputs=[result_image],
|
155 |
)
|