Update app.py
Browse files
app.py
CHANGED
|
@@ -73,6 +73,7 @@ def save_images(image_array, profile: gr.OAuthProfile | None, metadata: dict):
|
|
| 73 |
|
| 74 |
def generate(
|
| 75 |
prompt: str,
|
|
|
|
| 76 |
seed: int = 0,
|
| 77 |
guidance_scale: float = 8.0,
|
| 78 |
num_inference_steps: int = 4,
|
|
@@ -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, 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",
|
|
@@ -175,7 +176,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 |
|
|
|
|
| 73 |
|
| 74 |
def generate(
|
| 75 |
prompt: str,
|
| 76 |
+
tset: str,
|
| 77 |
seed: int = 0,
|
| 78 |
guidance_scale: float = 8.0,
|
| 79 |
num_inference_steps: int = 4,
|
|
|
|
| 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, "hiiii"],
|
| 180 |
api_name="run",
|
| 181 |
)
|
| 182 |
|