Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -75,8 +75,8 @@ def get_result(text_prompts, style_indx):
|
|
75 |
style = style_list[style_indx]
|
76 |
prompt = style + "," + text_prompts
|
77 |
|
78 |
-
|
79 |
-
image_output =
|
80 |
|
81 |
print("Generated image with prompt " + prompt)
|
82 |
|
|
|
75 |
style = style_list[style_indx]
|
76 |
prompt = style + "," + text_prompts
|
77 |
|
78 |
+
sdresult = pipe(prompt)
|
79 |
+
image_output = sdresult.images[0] if not sdresult.nsfw_content_detected[0] else Image.open("nsfw_placeholder.jpg")
|
80 |
|
81 |
print("Generated image with prompt " + prompt)
|
82 |
|