Update app.py
Browse files
app.py
CHANGED
@@ -86,6 +86,7 @@ def generate(
|
|
86 |
global num_images
|
87 |
|
88 |
seed = randomize_seed_fn(seed, randomize_seed)
|
|
|
89 |
np.random.seed(seed)
|
90 |
start_time = time.time()
|
91 |
result = pipe(
|
@@ -99,7 +100,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
|
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",
|
@@ -175,7 +176,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
175 |
num_inference_steps,
|
176 |
randomize_seed
|
177 |
],
|
178 |
-
outputs=[result],
|
179 |
api_name="run",
|
180 |
)
|
181 |
|
|
|
86 |
global num_images
|
87 |
|
88 |
seed = randomize_seed_fn(seed, randomize_seed)
|
89 |
+
test = "hello"
|
90 |
np.random.seed(seed)
|
91 |
start_time = time.time()
|
92 |
result = pipe(
|
|
|
100 |
).images
|
101 |
paths = save_images(result, profile, metadata={"prompt": prompt, "seed": seed, "width": width, "height": height, "guidance_scale": guidance_scale, "num_inference_steps": num_inference_steps})
|
102 |
print(time.time() - start_time)
|
103 |
+
return paths, seed, test
|
104 |
|
105 |
examples = [
|
106 |
"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",
|
|
|
176 |
num_inference_steps,
|
177 |
randomize_seed
|
178 |
],
|
179 |
+
outputs=[result, seed, "text"],
|
180 |
api_name="run",
|
181 |
)
|
182 |
|