Chris4K commited on
Commit
08f300b
·
verified ·
1 Parent(s): 7c64ece

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -32,7 +32,7 @@ import pandas as pd
32
  from io import StringIO
33
  with st.sidebar:
34
 
35
- uploaded_file = st.file_uploader("Choose a file")
36
  if uploaded_file is not None:
37
  # To read file as bytes:
38
  bytes_data = uploaded_file.getvalue()
@@ -49,8 +49,15 @@ with st.sidebar:
49
  # Can be used wherever a "file-like" object is accepted:
50
  dataframe = pd.read_csv(uploaded_file)
51
  st.write(dataframe)
52
-
 
 
 
 
 
53
  ########
 
 
54
 
55
  # Create a page with tabs
56
  tabs = st.tabs(["Chat", "URL, Tools and logging", "User Description", "Developers"])
 
32
  from io import StringIO
33
  with st.sidebar:
34
 
35
+ uploaded_file = st.file_uploader("Choose a file", type='csv')
36
  if uploaded_file is not None:
37
  # To read file as bytes:
38
  bytes_data = uploaded_file.getvalue()
 
49
  # Can be used wherever a "file-like" object is accepted:
50
  dataframe = pd.read_csv(uploaded_file)
51
  st.write(dataframe)
52
+
53
+
54
+ img_file_buffer = st.file_uploader('Upload a PNG image', type='png')
55
+ if img_file_buffer is not None:
56
+ image = Image.open(img_file_buffer)
57
+ img_array = np.array(image)
58
  ########
59
+ image
60
+ st.image(img_array)
61
 
62
  # Create a page with tabs
63
  tabs = st.tabs(["Chat", "URL, Tools and logging", "User Description", "Developers"])