Spaces:
Build error
Build error
Commit
·
d108c33
1
Parent(s):
2fbee6c
remove approig
Browse files- app(orig).py +0 -36
app(orig).py
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
from PIL import Image
|
3 |
-
|
4 |
-
# x = st.slider('Select a value')
|
5 |
-
# st.write(x, 'squared is', x * x)
|
6 |
-
|
7 |
-
image = Image.open('demo_image/demo_ballys.jpg') #Brand logo image (optional)
|
8 |
-
#Create two columns with different width
|
9 |
-
col1, col2 = st.columns( [0.8, 0.2])
|
10 |
-
with col1: # To display the header text using css style
|
11 |
-
st.markdown(""" <style> .font {
|
12 |
-
font-size:35px ; font-family: 'Cooper Black'; color: #FF9633;}
|
13 |
-
</style> """, unsafe_allow_html=True)
|
14 |
-
st.markdown('<p class="font">Upload your photo here...</p>', unsafe_allow_html=True)
|
15 |
-
with col2: # To display brand logo
|
16 |
-
st.image(image, width=150)
|
17 |
-
|
18 |
-
uploaded_file = st.file_uploader("Choose a file", type=["png", "jpg"])
|
19 |
-
if uploaded_file is not None:
|
20 |
-
# To read file as bytes:
|
21 |
-
bytes_data = uploaded_file.getvalue()
|
22 |
-
pillowImg = Image.open(uploaded_file)
|
23 |
-
# print("pillowImg shape: ", )
|
24 |
-
st.write(pillowImg.size)
|
25 |
-
|
26 |
-
# # To convert to a string based IO:
|
27 |
-
# stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))
|
28 |
-
# st.write(stringio)
|
29 |
-
#
|
30 |
-
# # To read file as string:
|
31 |
-
# string_data = stringio.read()
|
32 |
-
# st.write(string_data)
|
33 |
-
#
|
34 |
-
# # Can be used wherever a "file-like" object is accepted:
|
35 |
-
# dataframe = pd.read_csv(uploaded_file)
|
36 |
-
# st.write(dataframe)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|