Spaces:
Runtime error
Runtime error
fix main
Browse files
main.py
CHANGED
|
@@ -8,12 +8,12 @@ import numpy as np
|
|
| 8 |
_ = gettext.gettext
|
| 9 |
|
| 10 |
#language = st.selectbox(_('Choose your language'), ['en', 'it'])
|
| 11 |
-
try:
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
except:
|
| 16 |
-
|
| 17 |
|
| 18 |
st.markdown("<h1 style='text-align:center;'> Magic Board - CPU version</h1>", unsafe_allow_html=True)
|
| 19 |
# Specify canvas parameters in application
|
|
@@ -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
|
|
|
|
| 8 |
_ = gettext.gettext
|
| 9 |
|
| 10 |
#language = st.selectbox(_('Choose your language'), ['en', 'it'])
|
| 11 |
+
# try:
|
| 12 |
+
# localizator = gettext.translation('base', localedir='locales', languages=[language])
|
| 13 |
+
# localizator.install()
|
| 14 |
+
# _ = localizator.gettext
|
| 15 |
+
# except:
|
| 16 |
+
# pass
|
| 17 |
|
| 18 |
st.markdown("<h1 style='text-align:center;'> Magic Board - CPU version</h1>", unsafe_allow_html=True)
|
| 19 |
# Specify canvas parameters in application
|
|
|
|
| 46 |
placeholder=_('write you text here to improve the image with your favourite style'))
|
| 47 |
|
| 48 |
if st.button('Submit'):
|
| 49 |
+
img_size = (512,512)
|
| 50 |
if bg_image:
|
| 51 |
img_back=Image.open(bg_image).convert('RGB').resize(img_size)
|
| 52 |
comp_img = img_back
|