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
|
|
@@ -73,4 +73,9 @@ if st.button('Submit'):
|
|
| 73 |
del images
|
| 74 |
else:
|
| 75 |
st.image(images.images)
|
| 76 |
-
del images
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
placeholder=_('write you text here to improve the image with your favourite style'))
|
| 47 |
|
| 48 |
if st.button('Submit'):
|
| 49 |
+
img_size = (480, 480)
|
| 50 |
if bg_image:
|
| 51 |
img_back=Image.open(bg_image).convert('RGB').resize(img_size)
|
| 52 |
comp_img = img_back
|
|
|
|
| 73 |
del images
|
| 74 |
else:
|
| 75 |
st.image(images.images)
|
| 76 |
+
del images
|
| 77 |
+
|
| 78 |
+
st.warning("If you don't see any image could be the NSFW content checker or a Memory error."
|
| 79 |
+
"Please, re-run the submission and modify the prompt."
|
| 80 |
+
"Taking care that, each word in the prompt result in much more token for the model"
|
| 81 |
+
"which means much more memory usage.", icon="⚠️")
|