Spaces:
Running
Running
Rename app.py to home.py
Browse files
app.py
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
|
3 |
-
# Set page config
|
4 |
-
st.set_page_config(page_title="Innomatics Online Trainer Bot", layout="centered")
|
5 |
-
|
6 |
-
# Inject custom CSS for background and buttons
|
7 |
-
st.markdown("""
|
8 |
-
<style>
|
9 |
-
.main {
|
10 |
-
background-color: #8B0000;
|
11 |
-
padding: 20px;
|
12 |
-
}
|
13 |
-
.stButton>button {
|
14 |
-
background-color: #B76F27;
|
15 |
-
color: #8B0000;
|
16 |
-
border: 2px solid #8B0000;
|
17 |
-
border-radius: 10px;
|
18 |
-
padding: 10px 20px;
|
19 |
-
font-size: 18px;
|
20 |
-
font-weight: bold;
|
21 |
-
width: 100%;
|
22 |
-
transition: 0.3s ease-in-out;
|
23 |
-
}
|
24 |
-
.stButton>button:hover {
|
25 |
-
background-color: #8B0000;
|
26 |
-
color: #ffffff;
|
27 |
-
border: 2px solid white;
|
28 |
-
}
|
29 |
-
h1, h3, p {
|
30 |
-
color: white;
|
31 |
-
}
|
32 |
-
</style>
|
33 |
-
""", unsafe_allow_html=True)
|
34 |
-
|
35 |
-
# Title and intro
|
36 |
-
st.title("Innomatics Online Trainer Bot")
|
37 |
-
st.markdown("### π Welcome to the Innomatics Online Trainer Bot!")
|
38 |
-
st.markdown("This dashboard will guide you through your doubts in various modules.")
|
39 |
-
st.markdown("## In which module do you have doubt?")
|
40 |
-
|
41 |
-
# Button layout - 2 per row
|
42 |
-
col1, col2 = st.columns(2)
|
43 |
-
with col1:
|
44 |
-
if st.button("Python"):
|
45 |
-
st.switch_page("pages/python.py")
|
46 |
-
with col2:
|
47 |
-
if st.button("Machine Learning"):
|
48 |
-
st.switch_page("pages/machine_learning.py")
|
49 |
-
|
50 |
-
col3, col4 = st.columns(2)
|
51 |
-
with col3:
|
52 |
-
if st.button("Deep Learning"):
|
53 |
-
st.switch_page("pages/deep_learning.py")
|
54 |
-
with col4:
|
55 |
-
if st.button("Statistics"):
|
56 |
-
st.switch_page("pages/statistics.py")
|
57 |
-
|
58 |
-
col5, col6 = st.columns(2)
|
59 |
-
with col5:
|
60 |
-
if st.button("GenAI"):
|
61 |
-
st.switch_page("pages/gen_ai.py")
|
62 |
-
with col6:
|
63 |
-
if st.button("SQL"):
|
64 |
-
st.switch_page("pages/sql.py")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
home.py
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
# Set page configuration
|
4 |
+
st.set_page_config(page_title="Innomatics Online Trainer Bot", layout="centered")
|
5 |
+
|
6 |
+
# Custom CSS styling
|
7 |
+
st.markdown("""
|
8 |
+
<style>
|
9 |
+
.main {
|
10 |
+
background: linear-gradient(135deg, #430089 0%, #82ffa1 100%);
|
11 |
+
padding: 2rem;
|
12 |
+
font-family: 'Segoe UI', sans-serif;
|
13 |
+
}
|
14 |
+
.stButton>button {
|
15 |
+
background: #ffffff10;
|
16 |
+
border: 2px solid #ffffff50;
|
17 |
+
color: white;
|
18 |
+
font-size: 18px;
|
19 |
+
font-weight: 600;
|
20 |
+
padding: 0.8em 1.2em;
|
21 |
+
border-radius: 12px;
|
22 |
+
width: 100%;
|
23 |
+
transition: 0.3s ease;
|
24 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
|
25 |
+
}
|
26 |
+
.stButton>button:hover {
|
27 |
+
background: #ffffff30;
|
28 |
+
border-color: #fff;
|
29 |
+
color: #ffffff;
|
30 |
+
}
|
31 |
+
h1, h3, p {
|
32 |
+
color: #ffffff;
|
33 |
+
text-align: center;
|
34 |
+
}
|
35 |
+
hr {
|
36 |
+
border: 1px solid #ffffff50;
|
37 |
+
margin: 2em 0;
|
38 |
+
}
|
39 |
+
</style>
|
40 |
+
""", unsafe_allow_html=True)
|
41 |
+
|
42 |
+
# Header content
|
43 |
+
st.title("π€ Innomatics Online Trainer Bot")
|
44 |
+
st.markdown("### π Welcome to your personalized learning companion!")
|
45 |
+
st.markdown("This smart assistant helps you navigate your doubts in Data Science and related fields.")
|
46 |
+
|
47 |
+
st.markdown("## π Choose a module where you need help:")
|
48 |
+
|
49 |
+
# Grid of subject buttons
|
50 |
+
subjects = [
|
51 |
+
("Python", "pages/python.py"),
|
52 |
+
("Machine Learning", "pages/machine_learning.py"),
|
53 |
+
("Deep Learning", "pages/deep_learning.py"),
|
54 |
+
("Statistics", "pages/statistics.py"),
|
55 |
+
("GenAI", "pages/gen_ai.py"),
|
56 |
+
("SQL", "pages/sql.py")
|
57 |
+
]
|
58 |
+
|
59 |
+
# Render buttons in a grid (3 per row)
|
60 |
+
for i in range(0, len(subjects), 2):
|
61 |
+
cols = st.columns(2)
|
62 |
+
for j in range(2):
|
63 |
+
if i + j < len(subjects):
|
64 |
+
with cols[j]:
|
65 |
+
if st.button(subjects[i + j][0]):
|
66 |
+
st.switch_page(subjects[i + j][1])
|
67 |
+
|
68 |
+
# Footer note
|
69 |
+
st.markdown("---")
|
70 |
+
st.markdown("π§ *Empowering your journey through every concept, one question at a time.*")
|