Update app.py
Browse files
app.py
CHANGED
|
@@ -99,7 +99,7 @@ def generate(
|
|
| 99 |
).images
|
| 100 |
paths = save_images(result, profile, metadata={"prompt": prompt, "seed": seed, "width": width, "height": height, "guidance_scale": guidance_scale, "num_inference_steps": num_inference_steps})
|
| 101 |
print(time.time() - start_time)
|
| 102 |
-
return paths, seed
|
| 103 |
|
| 104 |
examples = [
|
| 105 |
"portrait photo of a girl, photograph, highly detailed face, depth of field, moody light, golden hour, style by Dan Winters, Russell James, Steve McCurry, centered, extremely detailed, Nikon D850, award winning photography",
|
|
@@ -124,6 +124,13 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 124 |
placeholder="Enter your prompt",
|
| 125 |
container=False,
|
| 126 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
run_button = gr.Button("Run", scale=0)
|
| 128 |
result = gr.Gallery(
|
| 129 |
label="Generated images", show_label=False, elem_id="gallery", grid=[2]
|
|
@@ -175,7 +182,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
| 175 |
num_inference_steps,
|
| 176 |
randomize_seed
|
| 177 |
],
|
| 178 |
-
outputs=[result, seed,
|
| 179 |
api_name="run",
|
| 180 |
)
|
| 181 |
|
|
|
|
| 99 |
).images
|
| 100 |
paths = save_images(result, profile, metadata={"prompt": prompt, "seed": seed, "width": width, "height": height, "guidance_scale": guidance_scale, "num_inference_steps": num_inference_steps})
|
| 101 |
print(time.time() - start_time)
|
| 102 |
+
return paths, seed
|
| 103 |
|
| 104 |
examples = [
|
| 105 |
"portrait photo of a girl, photograph, highly detailed face, depth of field, moody light, golden hour, style by Dan Winters, Russell James, Steve McCurry, centered, extremely detailed, Nikon D850, award winning photography",
|
|
|
|
| 124 |
placeholder="Enter your prompt",
|
| 125 |
container=False,
|
| 126 |
)
|
| 127 |
+
prompt2 = gr.Text(
|
| 128 |
+
label="Prompt2",
|
| 129 |
+
show_label=False,
|
| 130 |
+
max_lines=1,
|
| 131 |
+
placeholder="Enter your prompt",
|
| 132 |
+
container=False,
|
| 133 |
+
)
|
| 134 |
run_button = gr.Button("Run", scale=0)
|
| 135 |
result = gr.Gallery(
|
| 136 |
label="Generated images", show_label=False, elem_id="gallery", grid=[2]
|
|
|
|
| 182 |
num_inference_steps,
|
| 183 |
randomize_seed
|
| 184 |
],
|
| 185 |
+
outputs=[result, seed, prompt2],
|
| 186 |
api_name="run",
|
| 187 |
)
|
| 188 |
|