ArunK-2003 commited on
Commit
58af9c6
·
verified ·
1 Parent(s): e3f58aa

Updated app.py

Browse files
Files changed (1) hide show
  1. app.py +215 -215
app.py CHANGED
@@ -34,41 +34,34 @@ def login():
34
  .stApp {
35
  background: linear-gradient(
36
  125deg,
37
- #FEFFD2 0%,
38
- #DCFFB7 50%,
39
- #FFF8E3 100%
40
  );
41
  background-size: 200% 200%;
42
  animation: gradientMove 10s ease infinite;
43
  }
44
-
45
  @keyframes gradientMove {
46
  0% { background-position: 0% 50%; }
47
  50% { background-position: 100% 50%; }
48
  100% { background-position: 0% 50%; }
49
  }
50
-
51
  h1 {
52
- color: #ffffff;
53
  font-size: 3.5rem;
54
  font-weight: 900;
55
  text-align: center;
56
- text-shadow:
57
- 2px 2px 4px rgba(0, 0, 0, 0.4),
58
- 4px 4px 8px rgba(0, 0, 0, 0.3),
59
- 8px 8px 16px rgba(0, 0, 0, 0.2);
60
  margin-bottom: 3rem;
61
  letter-spacing: 2px;
62
  }
63
-
64
- .css-1y4p8pa {
65
- max-width: 500px;
66
  margin: 0 auto;
67
- padding: 2.5rem;
68
  background: linear-gradient(
69
  135deg,
70
- rgba(255, 255, 255, 0.1) 0%,
71
- rgba(255, 255, 255, 0.2) 100%
72
  );
73
  backdrop-filter: blur(15px);
74
  border-radius: 24px;
@@ -77,27 +70,23 @@ def login():
77
  inset -4px -4px 8px rgba(255, 255, 255, 0.1),
78
  inset 4px 4px 8px rgba(0, 0, 0, 0.2);
79
  border: 1px solid rgba(255, 255, 255, 0.18);
80
- transform: perspective(1000px) rotateX(2deg);
81
  }
82
-
83
  .stSelectbox label, .stDateInput label {
84
- color: white !important;
85
  font-weight: bold;
86
  font-size: 1rem;
87
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
88
  }
89
-
90
  .stSelectbox > div > div, .stDateInput > div > div {
91
- background: white;
92
  border: 1px solid rgba(255, 255, 255, 0.3);
93
  border-radius: 12px;
94
- color: grey;
95
  font-weight: bold;
96
  box-shadow:
97
  inset 2px 2px 5px rgba(0, 0, 0, 0.3),
98
  inset -2px -2px 5px rgba(255, 255, 255, 0.2);
99
  }
100
-
101
  .stButton > button {
102
  width: 100%;
103
  background: linear-gradient(
@@ -119,7 +108,6 @@ def login():
119
  inset 0 4px 8px rgba(255, 255, 255, 0.2);
120
  transition: all 0.3s ease;
121
  }
122
-
123
  .stButton > button:hover {
124
  transform: translateY(-3px) scale(1.03);
125
  box-shadow:
@@ -132,7 +120,6 @@ def login():
132
  #2563eb 100%
133
  );
134
  }
135
-
136
  </style>
137
  """, unsafe_allow_html=True)
138
 
@@ -155,7 +142,6 @@ def login():
155
  st.rerun()
156
 
157
 
158
-
159
  if 'logged_in' not in st.session_state:
160
  st.session_state.logged_in = False
161
 
@@ -163,199 +149,213 @@ if not st.session_state.logged_in:
163
  login()
164
  else:
165
  st.set_page_config(page_title="Kap Notes", layout="wide")
 
 
 
 
 
 
 
 
 
166
  css = '''
167
- <style>
168
- [data-testid="stExpander"] div:has(>.streamlit-expanderContent) {
169
- max-height: 400px;
170
- overflow-y: scroll;
171
- }
172
-
173
- [data-testid="stSidebar"] {
174
- min-width: 400px;
175
- }
176
-
177
- [data-testid="stSidebar"] > div:first-child {
178
- padding-top: 10px;
179
- }
180
-
181
- .main {
182
- margin-top: 0 !important;
183
- }
184
-
185
- .summary-box, .keypoints-box, .action-items-box {
186
- padding: 20px;
187
- border-radius: 15px;
188
- box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2), 0px 6px 15px rgba(0, 0, 0, 0.15);
189
- margin-top: 20px;
190
- margin-bottom: 30px;
191
- line-height: 1.8;
192
- font-size: 16px;
193
- color: #333;
194
- transition: transform 0.3s ease, box-shadow 0.3s ease;
195
- }
196
-
197
- .summary-box:hover, .keypoints-box:hover, .action-items-box:hover {
198
- transform: translateY(-1px) scale(1.05);
199
- box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.25), 0px 18px 35px rgba(0, 0, 0, 0.2);
200
- }
201
-
202
- .summary-box {
203
- background: linear-gradient(145deg, #F1EAFF, #E5D4FF);
204
- }
205
-
206
- .keypoints-box {
207
- background: linear-gradient(145deg, #F1EAFF, #E5D4FF);
208
- }
209
-
210
- .action-items-box {
211
- background: linear-gradient(145deg, #F1EAFF, #E5D4FF);
212
- }
213
-
214
- .summary-box, .keypoints-box, .action-items-box {
215
- border: 1px solid rgba(0, 0, 0, 0.1);
216
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 6px 18px rgba(0, 0, 0, 0.15);
217
- }
218
-
219
- .summary-box {
220
- background-color: #FFF8DC;
221
- }
222
-
223
- button:hover {
224
- background-color: white;
225
- color: black;
226
- border-color: black;
227
- }
228
-
229
- br {
230
- margin-top: 8px;
231
- }
232
-
233
- .audio-player-container {
234
- background: linear-gradient(135deg, #FF91A4, #FF4E00);
235
- padding: 25px;
236
- border-radius: 20px;
237
- box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2), 0px 6px 25px rgba(0, 0, 0, 0.15);
238
- margin-top: 30px;
239
- margin-bottom: 40px;
240
- text-align: center;
241
- font-size: 18px;
242
- transition: all 0.7s ease-in-out, transform 0.3s ease;
243
- }
244
-
245
- .audio-player-container:hover {
246
- transform: translateY(-10px) scale(1.03);
247
- box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.3), 0px 12px 35px rgba(0, 0, 0, 0.25);
248
- }
249
-
250
- .audio-player {
251
- width: 80%;
252
- height: 50px;
253
- border-radius: 15px;
254
- background-color: #FFF8DC;
255
- border: 1px solid rgba(0, 0, 0, 0.15);
256
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 6px 18px rgba(0, 0, 0, 0.15);
257
- transition: all 0.3s ease, transform 0.3s ease;
258
- }
259
-
260
- .audio-player:hover {
261
- background-color: #FF7F50;
262
- transform: scale(1.1);
263
- }
264
-
265
- .audio-player-container h4 {
266
- color: #333;
267
- font-weight: 700;
268
- margin-bottom: 15px;
269
- font-size: 22px;
270
- }
271
-
272
- .audio-player-container .play-button {
273
- background-color: #FF4E00;
274
- border: none;
275
- padding: 10px 20px;
276
- color: white;
277
- font-weight: 600;
278
- border-radius: 30px;
279
- cursor: pointer;
280
- transition: all 0.5s ease;
281
- }
282
-
283
- .audio-player-container .play-button:hover {
284
- background-color: #FF91A4;
285
- box-shadow: 0px 4px 20px rgba(255, 145, 164, 0.5);
286
- }
287
-
288
- .audio-player-container .play-button:focus {
289
- outline: none;
290
- }
291
-
292
- .comment-box {
293
- background: linear-gradient(145deg, #f4f9fb, #dce5f5);
294
- border: 1px solid #cfd9e6;
295
- border-radius: 10px;
296
- padding: 15px;
297
- margin-bottom: 20px;
298
- box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.1), -2px -2px 12px rgba(255, 255, 255, 0.8);
299
- font-family: 'Arial', sans-serif;
300
- transition: transform 0.3s ease, box-shadow 0.3s ease;
301
- }
302
-
303
- .comment-box:hover {
304
- transform: scale(1.02) translateY(-2px);
305
- box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.2), -4px -4px 20px rgba(255, 255, 255, 0.4);
306
- }
307
-
308
- .comment-header {
309
- display: flex;
310
- justify-content: space-between;
311
- margin-bottom: 10px;
312
- font-weight: bold;
313
- color: #3e3e3e;
314
- }
315
-
316
- .comment-text {
317
- color: #555;
318
- font-size: 14px;
319
- line-height: 1.6;
320
- }
321
-
322
- .comment-header span {
323
- color: #007bff;
324
- font-size: 12px;
325
- }
326
-
327
- .form-container {
328
- margin-bottom: 30px;
329
- }
330
-
331
- .stTextInput, .stTextArea {
332
- border-radius: 5px;
333
- border: 1px solid #ccc;
334
- padding: 10px;
335
- font-size: 14px;
336
- margin-bottom: 15px;
337
- width: 100%;
338
- }
339
-
340
- .stFormSubmitButton {
341
- background-color: #007bff;
342
- color: black;
343
- padding: 10px 20px;
344
- border-radius: 5px;
345
- font-size: 14px;
346
- cursor: pointer;
347
- transition: background-color 0.3s;
348
- }
349
-
350
- .stFormSubmitButton:hover {
351
- background-color: #0056b3;
352
- }
353
- </style>
354
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  '''
356
  st.markdown(css, unsafe_allow_html=True)
357
- client_name = st.session_state.client_name
358
- date = st.session_state.date
359
 
360
  summary_blob_name = f"{client_name}/{date.replace('_', '-')}/summary.txt"
361
  transcription_blob_name = f"{client_name}/{date.replace('_', '-')}/transcription.txt"
 
34
  .stApp {
35
  background: linear-gradient(
36
  125deg,
37
+ #F0F4F8 0%,
38
+ #D9E4F5 50%,
39
+ #E5EFF8 100%
40
  );
41
  background-size: 200% 200%;
42
  animation: gradientMove 10s ease infinite;
43
  }
 
44
  @keyframes gradientMove {
45
  0% { background-position: 0% 50%; }
46
  50% { background-position: 100% 50%; }
47
  100% { background-position: 0% 50%; }
48
  }
 
49
  h1 {
50
+ color: #4A4A4A;
51
  font-size: 3.5rem;
52
  font-weight: 900;
53
  text-align: center;
 
 
 
 
54
  margin-bottom: 3rem;
55
  letter-spacing: 2px;
56
  }
57
+ .login-form-container {
58
+ width: 400px;
 
59
  margin: 0 auto;
60
+ padding: 2rem;
61
  background: linear-gradient(
62
  135deg,
63
+ rgba(0, 0, 0, 0.1) 0%,
64
+ rgba(0, 0, 0, 0.15) 100%
65
  );
66
  backdrop-filter: blur(15px);
67
  border-radius: 24px;
 
70
  inset -4px -4px 8px rgba(255, 255, 255, 0.1),
71
  inset 4px 4px 8px rgba(0, 0, 0, 0.2);
72
  border: 1px solid rgba(255, 255, 255, 0.18);
 
73
  }
 
74
  .stSelectbox label, .stDateInput label {
75
+ color: #333333 !important;
76
  font-weight: bold;
77
  font-size: 1rem;
78
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
79
  }
 
80
  .stSelectbox > div > div, .stDateInput > div > div {
81
+ background: #2E3A47;
82
  border: 1px solid rgba(255, 255, 255, 0.3);
83
  border-radius: 12px;
84
+ color: #FFFFFF;
85
  font-weight: bold;
86
  box-shadow:
87
  inset 2px 2px 5px rgba(0, 0, 0, 0.3),
88
  inset -2px -2px 5px rgba(255, 255, 255, 0.2);
89
  }
 
90
  .stButton > button {
91
  width: 100%;
92
  background: linear-gradient(
 
108
  inset 0 4px 8px rgba(255, 255, 255, 0.2);
109
  transition: all 0.3s ease;
110
  }
 
111
  .stButton > button:hover {
112
  transform: translateY(-3px) scale(1.03);
113
  box-shadow:
 
120
  #2563eb 100%
121
  );
122
  }
 
123
  </style>
124
  """, unsafe_allow_html=True)
125
 
 
142
  st.rerun()
143
 
144
 
 
145
  if 'logged_in' not in st.session_state:
146
  st.session_state.logged_in = False
147
 
 
149
  login()
150
  else:
151
  st.set_page_config(page_title="Kap Notes", layout="wide")
152
+ client_name = st.session_state.client_name
153
+ date = st.session_state.date
154
+
155
+ st.sidebar.markdown(f'''
156
+ <div class="client-name-container">
157
+ <div class="client-name">{client_name}</div>
158
+ </div>
159
+ ''', unsafe_allow_html=True)
160
+
161
  css = '''
162
+ <style>
163
+ [data-testid="stExpander"] div:has(>.streamlit-expanderContent) {
164
+ max-height: 400px;
165
+ overflow-y: scroll;
166
+ }
167
+ [data-testid="stSidebar"] {
168
+ min-width: 400px;
169
+ }
170
+ [data-testid="stSidebar"] > div:first-child {
171
+ padding-top: 10px;
172
+ }
173
+ .main {
174
+ margin-top: 0 !important;
175
+ }
176
+ .summary-box, .keypoints-box, .action-items-box {
177
+ padding: 20px;
178
+ border-radius: 15px;
179
+ box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2), 0px 6px 15px rgba(0, 0, 0, 0.15);
180
+ margin-top: 20px;
181
+ margin-bottom: 30px;
182
+ line-height: 1.8;
183
+ font-size: 16px;
184
+ color: #333;
185
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
186
+ }
187
+ .summary-box:hover, .keypoints-box:hover, .action-items-box:hover {
188
+ transform: translateY(-1px) scale(1.05);
189
+ box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.25), 0px 18px 35px rgba(0, 0, 0, 0.2);
190
+ }
191
+ .summary-box {
192
+ background: linear-gradient(145deg, #F1EAFF, #E5D4FF);
193
+ }
194
+ .keypoints-box {
195
+ background: linear-gradient(145deg, #F1EAFF, #E5D4FF);
196
+ }
197
+ .action-items-box {
198
+ background: linear-gradient(145deg, #F1EAFF, #E5D4FF);
199
+ }
200
+ .summary-box, .keypoints-box, .action-items-box {
201
+ border: 1px solid rgba(0, 0, 0, 0.1);
202
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 6px 18px rgba(0, 0, 0, 0.15);
203
+ }
204
+ .summary-box {
205
+ background-color: #FFF8DC;
206
+ }
207
+ button:hover {
208
+ background-color: white;
209
+ color: black;
210
+ border-color: black;
211
+ }
212
+ br {
213
+ margin-top: 8px;
214
+ }
215
+ .audio-player-container {
216
+ background: linear-gradient(135deg, #FF91A4, #FF4E00);
217
+ padding: 25px;
218
+ border-radius: 20px;
219
+ box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2), 0px 6px 25px rgba(0, 0, 0, 0.15);
220
+ margin-top: 30px;
221
+ margin-bottom: 40px;
222
+ text-align: center;
223
+ font-size: 18px;
224
+ transition: all 0.7s ease-in-out, transform 0.3s ease;
225
+ }
226
+ .audio-player-container:hover {
227
+ transform: translateY(-10px) scale(1.03);
228
+ box-shadow: 0px 8px 25px rgba(0, 0, 0, 0.3), 0px 12px 35px rgba(0, 0, 0, 0.25);
229
+ }
230
+ .audio-player {
231
+ width: 80%;
232
+ height: 50px;
233
+ border-radius: 15px;
234
+ background-color: #FFF8DC;
235
+ border: 1px solid rgba(0, 0, 0, 0.15);
236
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 6px 18px rgba(0, 0, 0, 0.15);
237
+ transition: all 0.3s ease, transform 0.3s ease;
238
+ }
239
+ .audio-player:hover {
240
+ background-color: #FF7F50;
241
+ transform: scale(1.1);
242
+ }
243
+ .audio-player-container h4 {
244
+ color: #333;
245
+ font-weight: 700;
246
+ margin-bottom: 15px;
247
+ font-size: 22px;
248
+ }
249
+ .audio-player-container .play-button {
250
+ background-color: #FF4E00;
251
+ border: none;
252
+ padding: 10px 20px;
253
+ color: white;
254
+ font-weight: 600;
255
+ border-radius: 30px;
256
+ cursor: pointer;
257
+ transition: all 0.5s ease;
258
+ }
259
+ .audio-player-container .play-button:hover {
260
+ background-color: #FF91A4;
261
+ box-shadow: 0px 4px 20px rgba(255, 145, 164, 0.5);
262
+ }
263
+ .audio-player-container .play-button:focus {
264
+ outline: none;
265
+ }
266
+ .comment-box {
267
+ background: linear-gradient(145deg, #f4f9fb, #dce5f5);
268
+ border: 1px solid #cfd9e6;
269
+ border-radius: 10px;
270
+ padding: 15px;
271
+ margin-bottom: 20px;
272
+ box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.1), -2px -2px 12px rgba(255, 255, 255, 0.8);
273
+ font-family: 'Arial', sans-serif;
274
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
275
+ }
276
+ .comment-box:hover {
277
+ transform: scale(1.02) translateY(-2px);
278
+ box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.2), -4px -4px 20px rgba(255, 255, 255, 0.4);
279
+ }
280
+ .comment-header {
281
+ display: flex;
282
+ justify-content: space-between;
283
+ margin-bottom: 10px;
284
+ font-weight: bold;
285
+ color: #3e3e3e;
286
+ }
287
+ .comment-text {
288
+ color: #555;
289
+ font-size: 14px;
290
+ line-height: 1.6;
291
+ }
292
+ .comment-header span {
293
+ color: #007bff;
294
+ font-size: 12px;
295
+ }
296
+ .form-container {
297
+ margin-bottom: 30px;
298
+ }
299
+ .stTextInput, .stTextArea {
300
+ border-radius: 5px;
301
+ border: 1px solid #ccc;
302
+ padding: 10px;
303
+ font-size: 14px;
304
+ margin-bottom: 15px;
305
+ width: 100%;
306
+ }
307
+ .stFormSubmitButton {
308
+ color: black;
309
+ padding: 10px 20px;
310
+ border-radius: 5px;
311
+ font-size: 14px;
312
+ cursor: pointer;
313
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
314
 
315
+ .client-name-container {
316
+ padding: 20px;
317
+ border-radius: 10px;
318
+ background: linear-gradient(145deg, #ff7e5f, #feb47b);
319
+ box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1), -5px -5px 15px rgba(255, 255, 255, 0.3);
320
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
321
+ }
322
+
323
+ .client-name-container:hover {
324
+ transform: translateY(-5px) scale(1.05);
325
+ box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.15), -8px -8px 20px rgba(255, 255, 255, 0.4);
326
+ }
327
+
328
+ .client-name {
329
+ font-size: 2.5rem;
330
+ font-weight: 700;
331
+ color: #fff;
332
+ text-align: center;
333
+ margin: 0;
334
+ }
335
+
336
+ .form-container {
337
+ display: flex;
338
+ flex-direction: column;
339
+ align-items: center;
340
+ }
341
+
342
+ .stButton>button {
343
+ background-color: black;
344
+ color: white;
345
+ width: 150px;
346
+ height: 40px;
347
+ border: none;
348
+ cursor: pointer;
349
+ font-weight: bold;
350
+ transition: all 0.3s;
351
+ }
352
+ .stButton>button:hover {
353
+ background-color: white;
354
+ color: black;
355
+ }
356
+ </style>
357
  '''
358
  st.markdown(css, unsafe_allow_html=True)
 
 
359
 
360
  summary_blob_name = f"{client_name}/{date.replace('_', '-')}/summary.txt"
361
  transcription_blob_name = f"{client_name}/{date.replace('_', '-')}/transcription.txt"