Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def infer(prompt_part1, color, dress_type, front_design, back_design, prompt_par
|
|
46 |
generator=generator
|
47 |
).images[0]
|
48 |
|
49 |
-
return front_image, back_image
|
50 |
|
51 |
examples = [
|
52 |
["red", "t-shirt", "yellow stripes", "polka dots"],
|
@@ -127,22 +127,23 @@ with gr.Blocks(css=css) as demo:
|
|
127 |
elem_id="prompt_part5",
|
128 |
visible=False,
|
129 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
|
132 |
run_button = gr.Button("Run", scale=0)
|
133 |
|
134 |
front_result = gr.Image(label="Front View Result", show_label=False)
|
135 |
back_result = gr.Image(label="Back View Result", show_label=False)
|
136 |
-
|
|
|
137 |
with gr.Accordion("Advanced Settings", open=False):
|
138 |
|
139 |
-
negative_prompt = gr.Textbox(
|
140 |
-
label="Negative prompt",
|
141 |
-
max_lines=1,
|
142 |
-
placeholder="Enter a negative prompt",
|
143 |
-
visible=False,
|
144 |
-
)
|
145 |
-
|
146 |
seed = gr.Slider(
|
147 |
label="Seed",
|
148 |
minimum=0,
|
@@ -197,7 +198,7 @@ with gr.Blocks(css=css) as demo:
|
|
197 |
run_button.click(
|
198 |
fn=infer,
|
199 |
inputs=[prompt_part1, prompt_part2, prompt_part3, prompt_part4_front, prompt_part4_back, prompt_part5, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
200 |
-
outputs=[front_result, back_result]
|
201 |
)
|
202 |
|
203 |
demo.queue().launch()
|
|
|
46 |
generator=generator
|
47 |
).images[0]
|
48 |
|
49 |
+
return front_image, back_image, seed
|
50 |
|
51 |
examples = [
|
52 |
["red", "t-shirt", "yellow stripes", "polka dots"],
|
|
|
127 |
elem_id="prompt_part5",
|
128 |
visible=False,
|
129 |
)
|
130 |
+
|
131 |
+
negative_prompt = gr.Textbox(
|
132 |
+
label="Negative prompt",
|
133 |
+
max_lines=1,
|
134 |
+
placeholder="Enter a negative prompt",
|
135 |
+
visible=True,
|
136 |
+
)
|
137 |
|
138 |
|
139 |
run_button = gr.Button("Run", scale=0)
|
140 |
|
141 |
front_result = gr.Image(label="Front View Result", show_label=False)
|
142 |
back_result = gr.Image(label="Back View Result", show_label=False)
|
143 |
+
seed_result = gr.Textbox(label="Seed Used", show_label=False, interactive=False)
|
144 |
+
|
145 |
with gr.Accordion("Advanced Settings", open=False):
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
seed = gr.Slider(
|
148 |
label="Seed",
|
149 |
minimum=0,
|
|
|
198 |
run_button.click(
|
199 |
fn=infer,
|
200 |
inputs=[prompt_part1, prompt_part2, prompt_part3, prompt_part4_front, prompt_part4_back, prompt_part5, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
201 |
+
outputs=[front_result, back_result, seed_result]
|
202 |
)
|
203 |
|
204 |
demo.queue().launch()
|