Spaces:
Sleeping
Sleeping
Update pages/2_π_QuickML.py
Browse files- pages/2_π_QuickML.py +2 -2
pages/2_π_QuickML.py
CHANGED
@@ -73,9 +73,9 @@ if uploaded_file:
|
|
73 |
# Read the CSV File
|
74 |
if st.session_state.df is None:
|
75 |
# Read CSV or Excel file
|
76 |
-
if
|
77 |
return pd.read_csv(file)
|
78 |
-
elif
|
79 |
return pd.read_excel(file)
|
80 |
else:
|
81 |
raise ValueError("Unsupported file format. Only CSV and Excel files are supported.")
|
|
|
73 |
# Read the CSV 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(file)
|
78 |
+
elif uploaded_file.name.endswith('.xlsx') or file.name.endswith('.xls'):
|
79 |
return pd.read_excel(file)
|
80 |
else:
|
81 |
raise ValueError("Unsupported file format. Only CSV and Excel files are supported.")
|