Zasha1 commited on
Commit
9a6ec23
·
verified ·
1 Parent(s): 740f405

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -5
app.py CHANGED
@@ -184,8 +184,6 @@ def fetch_data_and_display():
184
  def run_app():
185
  st.set_page_config(page_title="Sales Call Assistant", layout="wide")
186
  st.title("AI Sales Call Assistant")
187
-
188
- # Display a warning message to visitors
189
  st.warning("The space is currently not working due to issues with real-time transcription and data fetching from Google Sheets. We are working on resolving these issues.")
190
 
191
  st.markdown("""
@@ -198,6 +196,7 @@ def run_app():
198
  margin-bottom: 30px;
199
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
200
  }
 
201
  /* Section Container Styling */
202
  .section {
203
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
@@ -206,6 +205,7 @@ def run_app():
206
  margin-bottom: 30px;
207
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
208
  }
 
209
  /* Header Text Styling */
210
  .header {
211
  font-size: 2.5em;
@@ -218,6 +218,7 @@ def run_app():
218
  padding: 10px;
219
  letter-spacing: 1px;
220
  }
 
221
  /* Subheader Styling */
222
  .subheader {
223
  font-size: 1.8em;
@@ -229,6 +230,7 @@ def run_app():
229
  margin-bottom: 10px;
230
  text-align: left;
231
  }
 
232
  /* Table Container Styling */
233
  .table-container {
234
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
@@ -237,28 +239,34 @@ def run_app():
237
  margin: 20px 0;
238
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
239
  }
 
240
  /* Dark mode adjustments */
241
  @media (prefers-color-scheme: dark) {
242
  .header-container {
243
  background: linear-gradient(135deg, #212529 0%, #343A40 100%);
244
  }
 
245
  .section {
246
  background: linear-gradient(135deg, #212529 0%, #2B3035 100%);
247
  }
 
248
  .table-container {
249
  background: linear-gradient(135deg, #212529 0%, #2B3035 100%);
250
  }
 
251
  .header {
252
  background: linear-gradient(120deg, #6EA8FE 0%, #9EC5FE 100%);
253
  -webkit-background-clip: text;
254
  -webkit-text-fill-color: transparent;
255
  }
 
256
  .subheader {
257
  background: linear-gradient(120deg, #6EA8FE 0%, #9EC5FE 100%);
258
  -webkit-background-clip: text;
259
  -webkit-text-fill-color: transparent;
260
  }
261
  }
 
262
  /* Button Styling */
263
  .stButton > button {
264
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
@@ -268,10 +276,12 @@ def run_app():
268
  border-radius: 5px;
269
  transition: all 0.3s ease;
270
  }
 
271
  .stButton > button:hover {
272
  background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
273
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
274
  }
 
275
  /* Tab Styling */
276
  .stTabs [data-baseweb="tab-list"] {
277
  gap: 24px;
@@ -279,6 +289,7 @@ def run_app():
279
  padding: 10px;
280
  border-radius: 10px;
281
  }
 
282
  .stTabs [data-baseweb="tab"] {
283
  background-color: transparent;
284
  border-radius: 4px;
@@ -286,22 +297,27 @@ def run_app():
286
  font-weight: 600;
287
  padding: 10px 16px;
288
  }
 
289
  .stTabs [aria-selected="true"] {
290
  background: linear-gradient(120deg, #2196F3 0%, #1976D2 100%);
291
  color: white;
292
  }
 
293
  /* Dark mode tab adjustments */
294
  @media (prefers-color-scheme: dark) {
295
  .stTabs [data-baseweb="tab-list"] {
296
  background: linear-gradient(135deg, #212529 0%, #343A40 100%);
297
  }
 
298
  .stTabs [data-baseweb="tab"] {
299
  color: #82B1FF;
300
  }
 
301
  .stTabs [aria-selected="true"] {
302
  background: linear-gradient(120deg, #448AFF 0%, #2979FF 100%);
303
  }
304
  }
 
305
  /* Message Styling */
306
  .success {
307
  background: linear-gradient(135deg, #43A047 0%, #2E7D32 100%);
@@ -310,6 +326,7 @@ def run_app():
310
  border-radius: 5px;
311
  margin: 10px 0;
312
  }
 
313
  .error {
314
  background: linear-gradient(135deg, #E53935 0%, #C62828 100%);
315
  color: white;
@@ -317,6 +334,7 @@ def run_app():
317
  border-radius: 5px;
318
  margin: 10px 0;
319
  }
 
320
  .warning {
321
  background: linear-gradient(135deg, #FB8C00 0%, #F57C00 100%);
322
  color: white;
@@ -325,7 +343,9 @@ def run_app():
325
  margin: 10px 0;
326
  }
327
  </style>
328
- """)
 
 
329
 
330
  st.sidebar.title("Navigation")
331
  app_mode = st.sidebar.radio("Choose a mode:", ["Real-Time Call Analysis", "Dashboard"])
@@ -386,7 +406,7 @@ def run_app():
386
  st.subheader("Detailed Call Information")
387
  st.write(f"**Call ID:** {call_id}")
388
  st.write(f"**Overall Sentiment:** {call_details.iloc[0]['Overall Sentiment']}")
389
-
390
  st.subheader("Full Call Summary")
391
  st.text_area("Summary:",
392
  value=call_details.iloc[0]['Summary'],
@@ -399,4 +419,4 @@ def run_app():
399
  st.error(f"Error loading dashboard: {e}")
400
 
401
  if __name__ == "__main__":
402
- run_app()
 
184
  def run_app():
185
  st.set_page_config(page_title="Sales Call Assistant", layout="wide")
186
  st.title("AI Sales Call Assistant")
 
 
187
  st.warning("The space is currently not working due to issues with real-time transcription and data fetching from Google Sheets. We are working on resolving these issues.")
188
 
189
  st.markdown("""
 
196
  margin-bottom: 30px;
197
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
198
  }
199
+
200
  /* Section Container Styling */
201
  .section {
202
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
 
205
  margin-bottom: 30px;
206
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
207
  }
208
+
209
  /* Header Text Styling */
210
  .header {
211
  font-size: 2.5em;
 
218
  padding: 10px;
219
  letter-spacing: 1px;
220
  }
221
+
222
  /* Subheader Styling */
223
  .subheader {
224
  font-size: 1.8em;
 
230
  margin-bottom: 10px;
231
  text-align: left;
232
  }
233
+
234
  /* Table Container Styling */
235
  .table-container {
236
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
 
239
  margin: 20px 0;
240
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
241
  }
242
+
243
  /* Dark mode adjustments */
244
  @media (prefers-color-scheme: dark) {
245
  .header-container {
246
  background: linear-gradient(135deg, #212529 0%, #343A40 100%);
247
  }
248
+
249
  .section {
250
  background: linear-gradient(135deg, #212529 0%, #2B3035 100%);
251
  }
252
+
253
  .table-container {
254
  background: linear-gradient(135deg, #212529 0%, #2B3035 100%);
255
  }
256
+
257
  .header {
258
  background: linear-gradient(120deg, #6EA8FE 0%, #9EC5FE 100%);
259
  -webkit-background-clip: text;
260
  -webkit-text-fill-color: transparent;
261
  }
262
+
263
  .subheader {
264
  background: linear-gradient(120deg, #6EA8FE 0%, #9EC5FE 100%);
265
  -webkit-background-clip: text;
266
  -webkit-text-fill-color: transparent;
267
  }
268
  }
269
+
270
  /* Button Styling */
271
  .stButton > button {
272
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
 
276
  border-radius: 5px;
277
  transition: all 0.3s ease;
278
  }
279
+
280
  .stButton > button:hover {
281
  background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
282
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
283
  }
284
+
285
  /* Tab Styling */
286
  .stTabs [data-baseweb="tab-list"] {
287
  gap: 24px;
 
289
  padding: 10px;
290
  border-radius: 10px;
291
  }
292
+
293
  .stTabs [data-baseweb="tab"] {
294
  background-color: transparent;
295
  border-radius: 4px;
 
297
  font-weight: 600;
298
  padding: 10px 16px;
299
  }
300
+
301
  .stTabs [aria-selected="true"] {
302
  background: linear-gradient(120deg, #2196F3 0%, #1976D2 100%);
303
  color: white;
304
  }
305
+
306
  /* Dark mode tab adjustments */
307
  @media (prefers-color-scheme: dark) {
308
  .stTabs [data-baseweb="tab-list"] {
309
  background: linear-gradient(135deg, #212529 0%, #343A40 100%);
310
  }
311
+
312
  .stTabs [data-baseweb="tab"] {
313
  color: #82B1FF;
314
  }
315
+
316
  .stTabs [aria-selected="true"] {
317
  background: linear-gradient(120deg, #448AFF 0%, #2979FF 100%);
318
  }
319
  }
320
+
321
  /* Message Styling */
322
  .success {
323
  background: linear-gradient(135deg, #43A047 0%, #2E7D32 100%);
 
326
  border-radius: 5px;
327
  margin: 10px 0;
328
  }
329
+
330
  .error {
331
  background: linear-gradient(135deg, #E53935 0%, #C62828 100%);
332
  color: white;
 
334
  border-radius: 5px;
335
  margin: 10px 0;
336
  }
337
+
338
  .warning {
339
  background: linear-gradient(135deg, #FB8C00 0%, #F57C00 100%);
340
  color: white;
 
343
  margin: 10px 0;
344
  }
345
  </style>
346
+ """, unsafe_allow_html=True)
347
+
348
+
349
 
350
  st.sidebar.title("Navigation")
351
  app_mode = st.sidebar.radio("Choose a mode:", ["Real-Time Call Analysis", "Dashboard"])
 
406
  st.subheader("Detailed Call Information")
407
  st.write(f"**Call ID:** {call_id}")
408
  st.write(f"**Overall Sentiment:** {call_details.iloc[0]['Overall Sentiment']}")
409
+
410
  st.subheader("Full Call Summary")
411
  st.text_area("Summary:",
412
  value=call_details.iloc[0]['Summary'],
 
419
  st.error(f"Error loading dashboard: {e}")
420
 
421
  if __name__ == "__main__":
422
+ run_app()