Spaces:
Sleeping
Sleeping
Update pages/2_π_QuickML.py
Browse files- pages/2_π_QuickML.py +3 -9
pages/2_π_QuickML.py
CHANGED
@@ -74,9 +74,9 @@ if uploaded_file:
|
|
74 |
if st.session_state.df is None:
|
75 |
# Read CSV or Excel file
|
76 |
if uploaded_file.name.endswith('.csv'):
|
77 |
-
return pd.read_csv(
|
78 |
elif uploaded_file.name.endswith('.xlsx') or file.name.endswith('.xls'):
|
79 |
-
return pd.read_excel(
|
80 |
else:
|
81 |
raise ValueError("Unsupported file format. Only CSV and Excel files are supported.")
|
82 |
else:
|
@@ -84,13 +84,7 @@ if uploaded_file:
|
|
84 |
# st.dataframe(df)
|
85 |
new_line()
|
86 |
|
87 |
-
|
88 |
-
if file.name.endswith('.csv'):
|
89 |
-
return pd.read_csv(file)
|
90 |
-
elif file.name.endswith('.xlsx') or file.name.endswith('.xls'):
|
91 |
-
return pd.read_excel(file)
|
92 |
-
else:
|
93 |
-
raise ValueError("Unsupported file format. Only CSV and Excel files are supported.")
|
94 |
|
95 |
# The Dataset
|
96 |
st.subheader("π¬ Dataset", anchor=False)
|
|
|
74 |
if st.session_state.df is None:
|
75 |
# Read CSV or Excel file
|
76 |
if uploaded_file.name.endswith('.csv'):
|
77 |
+
return pd.read_csv(uploaded_file)
|
78 |
elif uploaded_file.name.endswith('.xlsx') or file.name.endswith('.xls'):
|
79 |
+
return pd.read_excel(uploaded_file)
|
80 |
else:
|
81 |
raise ValueError("Unsupported file format. Only CSV and Excel files are supported.")
|
82 |
else:
|
|
|
84 |
# st.dataframe(df)
|
85 |
new_line()
|
86 |
|
87 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
# The Dataset
|
90 |
st.subheader("π¬ Dataset", anchor=False)
|