Mattral commited on
Commit
8f846de
·
verified ·
1 Parent(s): fc9b404

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -103,9 +103,9 @@ def new_line(n=1):
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.")
 
103
  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(file)
108
+ elif upd_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.")