Spaces:
Runtime error
Runtime error
Commit ·
fcdfb36
1
Parent(s): f66054f
final version classification
Browse files
app.py
CHANGED
|
@@ -1,20 +1,30 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
-
|
| 5 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
input_file = st.sidebar.file_uploader('Upload your CSV file', type=['csv'])
|
| 8 |
-
if input_file is not None:
|
| 9 |
-
df = pd.read_csv(input_file)
|
| 10 |
-
df_original = df.copy()
|
| 11 |
-
st.dataframe(df.head())
|
| 12 |
-
if 'df' not in st.session_state:
|
| 13 |
-
st.session_state.df = df
|
| 14 |
-
st.session_state.df_original = df_original
|
| 15 |
-
st.success('File uploaded successfully')
|
| 16 |
-
else:
|
| 17 |
-
st.warning('Please upload a CSV file')
|
| 18 |
|
| 19 |
|
| 20 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
+
# make all screen 100% width
|
| 5 |
+
st.set_page_config(layout='wide')
|
| 6 |
+
|
| 7 |
+
col1, col2, col3 = st.columns([15, 70, 15])
|
| 8 |
+
|
| 9 |
+
with col1:
|
| 10 |
+
st.write('')
|
| 11 |
+
with col2:
|
| 12 |
+
st.header('Machine Learning App')
|
| 13 |
+
st.subheader('Upload your CSV data')
|
| 14 |
+
input_file = st.file_uploader('Upload your CSV file', type=['csv'])
|
| 15 |
+
if input_file is not None:
|
| 16 |
+
df = pd.read_csv(input_file)
|
| 17 |
+
df_original = df.copy()
|
| 18 |
+
st.dataframe(df.head())
|
| 19 |
+
if 'df' not in st.session_state:
|
| 20 |
+
st.session_state.df = df
|
| 21 |
+
st.session_state.df_original = df_original
|
| 22 |
+
st.success('File uploaded successfully')
|
| 23 |
+
else:
|
| 24 |
+
st.warning('Please upload a CSV file')
|
| 25 |
+
with col3:
|
| 26 |
+
st.write('')
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
|
| 30 |
|