Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import numpy as np
|
|
| 7 |
#import cv2
|
| 8 |
from PIL import Image, ImageEnhance
|
| 9 |
from io import BytesIO
|
| 10 |
-
|
| 11 |
|
| 12 |
st.set_page_config(layout="wide")
|
| 13 |
#Create two columns with different width
|
|
@@ -73,7 +73,7 @@ if uploaded_file is not None:
|
|
| 73 |
if len(os.listdir('generated_samples')) <= 10:
|
| 74 |
result.save(f"generated_samples/{str(len(os.listdir('generated_samples')))}.png")
|
| 75 |
byte_im = buf.getvalue()
|
| 76 |
-
run =
|
| 77 |
#keeping the current style by update the weight
|
| 78 |
keep_style = st.sidebar.checkbox("Keep current style")
|
| 79 |
|
|
|
|
| 7 |
#import cv2
|
| 8 |
from PIL import Image, ImageEnhance
|
| 9 |
from io import BytesIO
|
| 10 |
+
import ste #for download button not to rerun
|
| 11 |
|
| 12 |
st.set_page_config(layout="wide")
|
| 13 |
#Create two columns with different width
|
|
|
|
| 73 |
if len(os.listdir('generated_samples')) <= 10:
|
| 74 |
result.save(f"generated_samples/{str(len(os.listdir('generated_samples')))}.png")
|
| 75 |
byte_im = buf.getvalue()
|
| 76 |
+
run =ste.download_button(label="Download Image", data=byte_im, file_name='afrodreams.jpg', mime="image/png")
|
| 77 |
#keeping the current style by update the weight
|
| 78 |
keep_style = st.sidebar.checkbox("Keep current style")
|
| 79 |
|