Focus5555665 commited on
Commit
f60c489
·
verified ·
1 Parent(s): 032440c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +46 -10
app.py CHANGED
@@ -1,14 +1,50 @@
1
- import webview
2
 
3
- # Function to create a browser window
4
- def create_window():
5
- # Create a web view window
6
- webview.create_window('My Project Browser', 'https://www.google.com', width=800, height=600)
 
 
 
7
 
8
- # Start the web view window
9
- webview.start()
 
 
 
 
 
 
10
 
11
- # Call the function to create and run the window
12
- if __name__ == '__main__':
13
- create_window()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
 
1
+ import streamlit as st
2
 
3
+ # Function to display the Home page
4
+ def show_home():
5
+ st.header("Welcome to the Home Page")
6
+ st.write("This is the home page of the website.")
7
+ st.image("https://via.placeholder.com/800x300", caption="Welcome Image")
8
+ st.write("### Introduction")
9
+ st.write("Here you can find various information about our website and what we offer.")
10
 
11
+ # Function to display the About page
12
+ def show_about():
13
+ st.header("About Us")
14
+ st.write("This is the About page.")
15
+ st.write("### Our Mission")
16
+ st.write("We aim to provide quality content and information.")
17
+ st.write("### Our Team")
18
+ st.write("We have a dedicated team working hard to achieve our goals.")
19
 
20
+ # Function to display the Contact page
21
+ def show_contact():
22
+ st.header("Contact Us")
23
+ st.write("This is the Contact page.")
24
+ st.write("If you have any questions, feel free to reach out!")
25
+ st.text_input("Your Name")
26
+ st.text_input("Your Email")
27
+ st.text_area("Your Message")
28
+ if st.button("Send"):
29
+ st.success("Your message has been sent!")
30
+
31
+ # Main function to run the app
32
+ def main():
33
+ st.title("My Big Streamlit Website")
34
+
35
+ # Sidebar for navigation
36
+ st.sidebar.title("Navigation")
37
+ page = st.sidebar.radio("Go to", ("Home", "About", "Contact"))
38
+
39
+ # Load the respective page based on selection
40
+ if page == "Home":
41
+ show_home()
42
+ elif page == "About":
43
+ show_about()
44
+ elif page == "Contact":
45
+ show_contact()
46
+
47
+ # Run the main function
48
+ if __name__ == "__main__":
49
+ main()
50