Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,8 @@ import random
|
|
6 |
import numpy as np
|
7 |
#import cv2
|
8 |
from PIL import Image, ImageEnhance
|
|
|
|
|
9 |
|
10 |
st.set_page_config(layout="wide")
|
11 |
#Create two columns with different width
|
@@ -56,9 +58,12 @@ if uploaded_file is not None:
|
|
56 |
with col2:
|
57 |
result = Image.open('out.png')
|
58 |
st.image(result, width=300)
|
59 |
-
|
|
|
|
|
|
|
|
|
60 |
|
61 |
|
62 |
|
63 |
-
#img = neural_style.transfer(params)
|
64 |
|
|
|
6 |
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
|
|
|
58 |
with col2:
|
59 |
result = Image.open('out.png')
|
60 |
st.image(result, width=300)
|
61 |
+
buf = BytesIO()
|
62 |
+
result.save(buf, format="JPEG")
|
63 |
+
byte_im = buf.getvalue()
|
64 |
+
run =st.download_button(label="Download Image", data=byte_im, file_name='afrodreams.png', mime="image/png")
|
65 |
+
|
66 |
|
67 |
|
68 |
|
|
|
69 |
|