Spaces:
Runtime error
Runtime error
fix main
Browse files
main.py
CHANGED
|
@@ -46,7 +46,7 @@ prompt = st.text_input(_('Prompt to generate your cool image'),
|
|
| 46 |
placeholder=_('write you text here to improve the image with your favourite style'))
|
| 47 |
|
| 48 |
if st.button('Submit'):
|
| 49 |
-
img_size = (
|
| 50 |
if bg_image:
|
| 51 |
img_back=Image.open(bg_image).convert('RGB').resize(img_size)
|
| 52 |
comp_img = img_back
|
|
@@ -70,5 +70,7 @@ if st.button('Submit'):
|
|
| 70 |
strength=strength)
|
| 71 |
if images["nsfw_content_detected"]:
|
| 72 |
st.write("NSFW content detected, retry with another prompt or image")
|
|
|
|
| 73 |
else:
|
| 74 |
-
st.image(images.images)
|
|
|
|
|
|
| 46 |
placeholder=_('write you text here to improve the image with your favourite style'))
|
| 47 |
|
| 48 |
if st.button('Submit'):
|
| 49 |
+
img_size = (320, 240)
|
| 50 |
if bg_image:
|
| 51 |
img_back=Image.open(bg_image).convert('RGB').resize(img_size)
|
| 52 |
comp_img = img_back
|
|
|
|
| 70 |
strength=strength)
|
| 71 |
if images["nsfw_content_detected"]:
|
| 72 |
st.write("NSFW content detected, retry with another prompt or image")
|
| 73 |
+
del images
|
| 74 |
else:
|
| 75 |
+
st.image(images.images)
|
| 76 |
+
del images
|