Spaces:
Build error
Build error
Focus5555665
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,50 @@
|
|
1 |
-
import
|
2 |
|
3 |
-
# Function to
|
4 |
-
def
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
7 |
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
#
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|