Anshini commited on
Commit
d5ad75e
·
verified ·
1 Parent(s): f9b44c9

Update pages/python.py

Browse files
Files changed (1) hide show
  1. pages/python.py +78 -17
pages/python.py CHANGED
@@ -11,44 +11,105 @@ os.environ['HF_TOKEN'] = hf
11
  st.set_page_config(page_title="Python Mentor Chat", layout="centered")
12
 
13
  # Inject home page CSS style
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  st.markdown("""
15
  <style>
16
  .main {
17
- background: linear-gradient(135deg, #430089 0%, #82ffa1 100%);
18
  padding: 2rem;
19
  font-family: 'Segoe UI', sans-serif;
20
  }
21
  .stButton>button {
22
- background: #ffffff10;
23
- border: 2px solid #ffffff50;
24
  color: white;
25
- font-size: 18px;
26
  font-weight: 600;
27
- padding: 0.8em 1.2em;
28
- border-radius: 12px;
29
- width: 100%;
30
- transition: 0.3s ease;
31
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
32
  }
33
  .stButton>button:hover {
34
- background: #ffffff30;
 
35
  border-color: #fff;
36
- color: #ffffff;
37
  }
38
  h1, h3, p, label {
39
- color: #ffffff;
40
  text-align: center;
41
  }
42
- hr {
43
- border: 1px solid #ffffff50;
44
- margin: 2em 0;
 
 
 
 
 
 
 
 
45
  }
46
- .css-1aumxhk {
47
- color: white;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
49
  </style>
50
  """, unsafe_allow_html=True)
51
 
 
 
 
 
52
  # Title
53
  st.title("🐍 Python Mentor Chat")
54
 
 
11
  st.set_page_config(page_title="Python Mentor Chat", layout="centered")
12
 
13
  # Inject home page CSS style
14
+ # st.markdown("""
15
+ # <style>
16
+ # .main {
17
+ # background: linear-gradient(135deg, #430089 0%, #82ffa1 100%);
18
+ # padding: 2rem;
19
+ # font-family: 'Segoe UI', sans-serif;
20
+ # }
21
+ # .stButton>button {
22
+ # background: #ffffff10;
23
+ # border: 2px solid #ffffff50;
24
+ # color: white;
25
+ # font-size: 18px;
26
+ # font-weight: 600;
27
+ # padding: 0.8em 1.2em;
28
+ # border-radius: 12px;
29
+ # width: 100%;
30
+ # transition: 0.3s ease;
31
+ # box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
32
+ # }
33
+ # .stButton>button:hover {
34
+ # background: #ffffff30;
35
+ # border-color: #fff;
36
+ # color: #ffffff;
37
+ # }
38
+ # h1, h3, p, label {
39
+ # color: #ffffff;
40
+ # text-align: center;
41
+ # }
42
+ # hr {
43
+ # border: 1px solid #ffffff50;
44
+ # margin: 2em 0;
45
+ # }
46
+ # .css-1aumxhk {
47
+ # color: white;
48
+ # }
49
+ # </style>
50
+ # """, unsafe_allow_html=True)
51
+
52
  st.markdown("""
53
  <style>
54
  .main {
55
+ background: linear-gradient(to right, #1f4037, #99f2c8);
56
  padding: 2rem;
57
  font-family: 'Segoe UI', sans-serif;
58
  }
59
  .stButton>button {
60
+ background-color: #ffffff10;
 
61
  color: white;
 
62
  font-weight: 600;
63
+ border-radius: 10px;
64
+ padding: 0.6rem 1rem;
65
+ transition: all 0.3s ease;
66
+ border: 1px solid white;
 
67
  }
68
  .stButton>button:hover {
69
+ background-color: #ffffff30;
70
+ color: white;
71
  border-color: #fff;
 
72
  }
73
  h1, h3, p, label {
74
+ color: white;
75
  text-align: center;
76
  }
77
+ .chat-bubble-user {
78
+ background-color: #ffffff25;
79
+ padding: 0.75rem 1rem;
80
+ border-radius: 1rem;
81
+ margin-bottom: 0.5rem;
82
+ color: #fff;
83
+ font-weight: 500;
84
+ text-align: left;
85
+ width: fit-content;
86
+ max-width: 90%;
87
+ align-self: flex-end;
88
  }
89
+ .chat-bubble-bot {
90
+ background-color: #ffffff15;
91
+ padding: 0.75rem 1rem;
92
+ border-radius: 1rem;
93
+ margin-bottom: 0.5rem;
94
+ color: #fff;
95
+ text-align: left;
96
+ width: fit-content;
97
+ max-width: 90%;
98
+ align-self: flex-start;
99
+ }
100
+ .chat-container {
101
+ display: flex;
102
+ flex-direction: column;
103
+ gap: 0.5rem;
104
+ margin-top: 2rem;
105
  }
106
  </style>
107
  """, unsafe_allow_html=True)
108
 
109
+ # Page title
110
+ st.markdown("<h1 style='margin-bottom: 0;'>🗃️ SQL Mentor Chat</h1>", unsafe_allow_html=True)
111
+ st.markdown("<p style='margin-top: 0.2rem;'>Learn SQL interactively from your AI mentor!</p>", unsafe_allow_html=True)
112
+
113
  # Title
114
  st.title("🐍 Python Mentor Chat")
115