Spaces:
Build error
Build error
Update template/app_advanced.py
Browse files- template/app_advanced.py +2 -9
template/app_advanced.py
CHANGED
@@ -50,7 +50,7 @@ def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator):
|
|
50 |
height = height,
|
51 |
generator = generator)
|
52 |
|
53 |
-
return result.images[0]
|
54 |
|
55 |
def img_to_img(prompt, neg_prompt, img, strength, guidance, steps, width, height, generator):
|
56 |
|
@@ -67,14 +67,7 @@ def img_to_img(prompt, neg_prompt, img, strength, guidance, steps, width, height
|
|
67 |
height = height,
|
68 |
generator = generator)
|
69 |
|
70 |
-
return result.images[0]
|
71 |
-
|
72 |
-
def replace_nsfw_images(results):
|
73 |
-
|
74 |
-
for i in range(len(results.images)):
|
75 |
-
if 'nsfw_content_detected' in results and results.nsfw_content_detected[i]:
|
76 |
-
results.images[i] = Image.open("nsfw.png")
|
77 |
-
return results.images[0]
|
78 |
|
79 |
css = """.main-div div{display:inline-flex;align-items:center;gap:.8rem;font-size:1.75rem}.main-div div h1{font-weight:900;margin-bottom:7px}.main-div p{margin-bottom:10px;font-size:94%}a{text-decoration:underline}.tabs{margin-top:0;margin-bottom:0}#gallery{min-height:20rem}
|
80 |
"""
|
|
|
50 |
height = height,
|
51 |
generator = generator)
|
52 |
|
53 |
+
return result.images[0]
|
54 |
|
55 |
def img_to_img(prompt, neg_prompt, img, strength, guidance, steps, width, height, generator):
|
56 |
|
|
|
67 |
height = height,
|
68 |
generator = generator)
|
69 |
|
70 |
+
return result.images[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
css = """.main-div div{display:inline-flex;align-items:center;gap:.8rem;font-size:1.75rem}.main-div div h1{font-weight:900;margin-bottom:7px}.main-div p{margin-bottom:10px;font-size:94%}a{text-decoration:underline}.tabs{margin-top:0;margin-bottom:0}#gallery{min-height:20rem}
|
73 |
"""
|