Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -101,9 +101,15 @@ def new_line(n=1):
|
|
101 |
|
102 |
# Load Data
|
103 |
st.cache_data()
|
104 |
-
def load_data(upd_file
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
# Progress Bar
|
109 |
def progress_bar():
|
|
|
101 |
|
102 |
# Load Data
|
103 |
st.cache_data()
|
104 |
+
def load_data(upd_file
|
105 |
+
# Read CSV or Excel file
|
106 |
+
if file.name.endswith('.csv'):
|
107 |
+
return pd.read_csv(file)
|
108 |
+
elif file.name.endswith('.xlsx') or file.name.endswith('.xls'):
|
109 |
+
return pd.read_excel(file)
|
110 |
+
else:
|
111 |
+
raise ValueError("Unsupported file format. Only CSV and Excel files are supported.")
|
112 |
+
|
113 |
|
114 |
# Progress Bar
|
115 |
def progress_bar():
|