yashm commited on
Commit
5a61309
·
verified ·
1 Parent(s): 8cdc1d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -106,13 +106,16 @@ def main():
106
  st.subheader("{app_subtitle}")
107
  st.sidebar.title("{side_panel_title}")
108
 
109
- @st.cache
110
- def load_data():
111
- return pd.read_csv("your_data.csv") # Replace "your_data.csv" with the path to your dataset
112
 
113
- df = load_data()
 
 
 
114
 
115
- {analysis_tasks}
 
 
116
 
117
  if __name__ == "__main__":
118
  main()
 
106
  st.subheader("{app_subtitle}")
107
  st.sidebar.title("{side_panel_title}")
108
 
109
+ uploaded_file = st.file_uploader("Upload a CSV file", type=["csv"])
 
 
110
 
111
+ if uploaded_file is not None:
112
+ @st.cache
113
+ def load_data():
114
+ return pd.read_csv(uploaded_file)
115
 
116
+ df = load_data()
117
+
118
+ {analysis_tasks}
119
 
120
  if __name__ == "__main__":
121
  main()