Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -104,9 +104,9 @@ st.cache_data()
|
|
| 104 |
def load_data(upd_file):
|
| 105 |
# Read CSV or Excel file
|
| 106 |
if upd_file.name.endswith('.csv'):
|
| 107 |
-
return pd.read_csv(
|
| 108 |
elif upd_file.name.endswith('.xlsx') or file.name.endswith('.xls'):
|
| 109 |
-
return pd.read_excel(
|
| 110 |
else:
|
| 111 |
raise ValueError("Unsupported file format. Only CSV and Excel files are supported.")
|
| 112 |
|
|
|
|
| 104 |
def load_data(upd_file):
|
| 105 |
# Read CSV or Excel file
|
| 106 |
if upd_file.name.endswith('.csv'):
|
| 107 |
+
return pd.read_csv(upd_file)
|
| 108 |
elif upd_file.name.endswith('.xlsx') or file.name.endswith('.xls'):
|
| 109 |
+
return pd.read_excel(upd_file)
|
| 110 |
else:
|
| 111 |
raise ValueError("Unsupported file format. Only CSV and Excel files are supported.")
|
| 112 |
|