CosmoAI commited on
Commit
33a2172
·
1 Parent(s): 34bf94c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +40 -0
app.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+
4
+ def main():
5
+ # Create a title for the dashboard
6
+ st.title("Dashboard")
7
+
8
+ # Create a sidebar with a dropdown menu
9
+ with st.sidebar:
10
+ options = ["Profile", "Statistics", "About"]
11
+ option = st.selectbox("Select an option", options)
12
+
13
+ # Display the profile information if the user selects "Profile"
14
+ if option == "Profile":
15
+ profile = pd.DataFrame({
16
+ "Name": ["Hennifer Doe"],
17
+ "Email": ["[email protected]"],
18
+ "Location": ["San Francisco, CA"],
19
+ })
20
+ st.dataframe(profile)
21
+
22
+ # Display the statistics if the user selects "Statistics"
23
+ elif option == "Statistics":
24
+ statistics = pd.DataFrame({
25
+ "Number of Visitors": 1000,
26
+ "Average Time Spent on Page": 2 minutes,
27
+ "Bounce Rate": 10%,
28
+ })
29
+ st.dataframe(statistics)
30
+
31
+ # Display the about information if the user selects "About"
32
+ else:
33
+ about = """
34
+ This is a simple dashboard created with Streamlit.
35
+ You can select an option from the sidebar to display different information.
36
+ """
37
+ st.write(about)
38
+
39
+ if __name__ == "__main__":
40
+ main()