Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
# Set page configuration
|
4 |
+
st.set_page_config(page_title="Innomatics Data Science Chat Bot", layout="centered")
|
5 |
+
|
6 |
+
# Custom CSS styling
|
7 |
+
st.markdown("""
|
8 |
+
<style>
|
9 |
+
.main {
|
10 |
+
background: linear-gradient(to right, #1e3c72, #2a5298);
|
11 |
+
padding: 2rem;
|
12 |
+
font-family: 'Segoe UI', sans-serif;
|
13 |
+
}
|
14 |
+
.stButton>button {
|
15 |
+
background-color: rgba(255, 255, 255, 0.1);
|
16 |
+
border: 2px solid #ffffff33;
|
17 |
+
color: white;
|
18 |
+
font-size: 16px;
|
19 |
+
font-weight: bold;
|
20 |
+
padding: 0.6em 1.2em;
|
21 |
+
border-radius: 15px;
|
22 |
+
margin-top: 10px;
|
23 |
+
transition: all 0.3s ease;
|
24 |
+
width: 100%;
|
25 |
+
}
|
26 |
+
.stButton>button:hover {
|
27 |
+
background-color: rgba(255, 255, 255, 0.3);
|
28 |
+
color: #000;
|
29 |
+
border-color: white;
|
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 |
+
.glass-panel {
|
40 |
+
background: rgba(255, 255, 255, 0.1);
|
41 |
+
border-radius: 20px;
|
42 |
+
padding: 2rem;
|
43 |
+
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
|
44 |
+
backdrop-filter: blur(5px);
|
45 |
+
}
|
46 |
+
</style>
|
47 |
+
""", unsafe_allow_html=True)
|
48 |
+
|
49 |
+
# Glass Panel Wrapper
|
50 |
+
with st.container():
|
51 |
+
st.markdown('<div class="glass-panel">', unsafe_allow_html=True)
|
52 |
+
|
53 |
+
st.title("π€ Innomatics Data Science Chat Bot")
|
54 |
+
# st.markdown("### π Welcome to your personalized learning companion!")
|
55 |
+
# st.markdown("This smart assistant helps you navigate your doubts in Data Science and related fields.")
|
56 |
+
|
57 |
+
st.markdown("## π Select the domain:")
|
58 |
+
|
59 |
+
# Grid of subject buttons
|
60 |
+
subjects = [
|
61 |
+
("π Python", "pages/python.py"),
|
62 |
+
("π§ Machine Learning", "pages/machine_learning.py"),
|
63 |
+
("πΈοΈ Deep Learning", "pages/deep_learning.py"),
|
64 |
+
("π Statistics", "pages/statistics.py"),
|
65 |
+
("β¨ GenAI", "pages/gen_ai.py"),
|
66 |
+
("π’οΈ SQL", "pages/sql.py")
|
67 |
+
]
|
68 |
+
|
69 |
+
# Render buttons in a grid (3 per row)
|
70 |
+
for i in range(0, len(subjects), 3):
|
71 |
+
cols = st.columns([1, 1, 1])
|
72 |
+
for j in range(3):
|
73 |
+
if i + j < len(subjects):
|
74 |
+
with cols[j]:
|
75 |
+
if st.button(subjects[i + j][0]):
|
76 |
+
st.switch_page(subjects[i + j][1])
|
77 |
+
|
78 |
+
st.markdown("---")
|
79 |
+
st.markdown("π§ *Empowering your journey through every concept, one question at a time.*")
|
80 |
+
st.markdown('</div>', unsafe_allow_html=True)
|