Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -4,18 +4,6 @@ import streamlit as st
|
|
4 |
|
5 |
uploaded_file = st.file_uploader("Choose a file")
|
6 |
if uploaded_file is not None:
|
7 |
-
# To read file as bytes:
|
8 |
-
bytes_data = uploaded_file.getvalue()
|
9 |
-
st.write(bytes_data)
|
10 |
-
|
11 |
-
# To convert to a string based IO:
|
12 |
-
stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))
|
13 |
-
st.write(stringio)
|
14 |
-
|
15 |
-
# To read file as string:
|
16 |
-
string_data = stringio.read()
|
17 |
-
st.write(string_data)
|
18 |
-
|
19 |
# Can be used wherever a "file-like" object is accepted:
|
20 |
dataframe = pd.read_csv(uploaded_file)
|
21 |
st.write(dataframe)
|
|
|
4 |
|
5 |
uploaded_file = st.file_uploader("Choose a file")
|
6 |
if uploaded_file is not None:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Can be used wherever a "file-like" object is accepted:
|
8 |
dataframe = pd.read_csv(uploaded_file)
|
9 |
st.write(dataframe)
|