wanwanlin0521 commited on
Commit
aa0f597
·
verified ·
1 Parent(s): 7ff45db

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +30 -0
src/streamlit_app.py CHANGED
@@ -156,3 +156,33 @@ plt.xlabel("Year")
156
  plt.ylabel("Crime Type")
157
  plt.tight_layout()
158
  plt.show()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  plt.ylabel("Crime Type")
157
  plt.tight_layout()
158
  plt.show()
159
+
160
+ # Set up sidebar menu
161
+ menu = st.sidebar.selectbox(
162
+ "Select a page",
163
+ ["Home", "About", "Data", "Contact"]
164
+ )
165
+
166
+ # Define what each menu option does
167
+ if menu == "Home":
168
+ st.title("Welcome to the Home Page")
169
+ st.write("This is the home view of your Streamlit app.")
170
+
171
+ elif menu == "About":
172
+ st.title("About This App")
173
+ st.write("This app is hosted on Hugging Face using Streamlit.")
174
+
175
+ elif menu == "Data":
176
+ st.title("Data Viewer")
177
+ st.write("Display some data here.")
178
+ # Example: Show a sample dataframe
179
+ import pandas as pd
180
+ df = pd.DataFrame({
181
+ 'Column 1': [1, 2, 3],
182
+ 'Column 2': ['A', 'B', 'C']
183
+ })
184
+ st.dataframe(df)
185
+
186
+ elif menu == "Contact":
187
+ st.title("Contact Us")
188
+ st.write("Email: example@example.com")