UKURIKIYEYEZU commited on
Commit
323aef6
·
verified ·
1 Parent(s): 336207a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +62 -92
app.py CHANGED
@@ -366,7 +366,7 @@ class UserSession:
366
  self.set_welcome_message(user_info.get("Nickname", "Guest"))
367
  # Initialize conversation history with welcome message
368
  welcome = self.get_welcome_message()
369
- initial_message = (
370
  )
371
  self.conversation_history = [
372
  {"role": "assistant", "content": welcome},
@@ -433,7 +433,7 @@ def collect_user_info(Nickname):
433
 
434
  # Add initial message to start the conversation
435
  def add_initial_message(chatbot):
436
- initial_message = (
437
  )
438
  return chatbot + [(None, initial_message)]
439
 
@@ -516,98 +516,68 @@ def chatbot_interface():
516
 
517
 
518
  with gr.Blocks(css="""
519
- :root {
520
- --primary: #10A37F;
521
- --secondary: #19C99D;
522
- --accent: #FF6B6B;
523
  --background: #000000;
524
  --text: #FFFFFF;
525
- --card-bg: #1E1E1E;
526
- }
527
-
528
- body {
529
- background: var(--background) !important;
530
- color: var(--text) !important;
531
- font-family: 'Inter', system-ui, sans-serif;
532
- margin: 0 !important;
533
- padding: 0 !important;
534
- width: 100vw !important;
535
- height: 100vh !important;
536
- display: flex;
537
- flex-direction: column;
538
- }
539
-
540
- .gradio-container {
541
- max-width: 100% !important;
542
- width: 100vw !important;
543
- height: 100vh !important;
544
- margin: 0 !important;
545
- padding: 20px !important;
546
- display: flex;
547
- flex-direction: column;
548
- }
549
-
550
- .welcome-box {
551
- background: var(--card-bg) !important;
552
- border-radius: 12px !important;
553
- padding: 2rem !important;
554
- box-shadow: 0 4px 6px rgba(255, 255, 255, 0.05) !important;
555
- border: 1px solid rgba(255, 255, 255, 0.1) !important;
556
- }
557
-
558
- .chat-container {
559
- border-radius: 12px !important;
560
- background: var(--card-bg) !important;
561
- box-shadow: 0 4px 6px rgba(255, 255, 255, 0.05) !important;
562
- border: 1px solid rgba(255, 255, 255, 0.1) !important;
563
- flex-grow: 1;
564
- min-height: 600px;
565
- }
566
-
567
- .gr-button-primary {
568
- background: var(--primary) !important;
569
- color: white !important;
570
- padding: 12px 24px !important;
571
- border-radius: 8px !important;
572
- transition: all 0.3s ease !important;
573
- }
574
-
575
- .gr-button-primary:hover {
576
- transform: translateY(-1px);
577
- box-shadow: 0 4px 12px rgba(16, 163, 127, 0.2) !important;
578
- }
579
-
580
- .gr-textbox {
581
- background: var(--card-bg) !important;
582
- color: var(--text) !important;
583
- border-radius: 8px !important;
584
- padding: 12px 16px !important;
585
- border: 1px solid rgba(255, 255, 255, 0.1) !important;
586
- }
587
-
588
- .chatbot {
589
- background: transparent !important;
590
- border: none !important;
591
- }
592
-
593
- .bot {
594
- background: var(--card-bg) !important;
595
- border: 1px solid rgba(255, 255, 255, 0.1) !important;
596
- margin-right: auto !important;
597
- }
598
-
599
- footer {
600
- text-align: center !important;
601
- color: var(--text) !important;
602
- opacity: 0.7 !important;
603
- padding: 1rem !important;
604
- font-size: 0.9em !important;
605
- }
606
-
607
- .gr-markdown h3 {
608
- color: var(--primary) !important;
609
- margin-bottom: 1rem !important;
610
- }
611
 
612
 
613
  """) as demo:
 
366
  self.set_welcome_message(user_info.get("Nickname", "Guest"))
367
  # Initialize conversation history with welcome message
368
  welcome = self.get_welcome_message()
369
+ initial_message = (" "
370
  )
371
  self.conversation_history = [
372
  {"role": "assistant", "content": welcome},
 
433
 
434
  # Add initial message to start the conversation
435
  def add_initial_message(chatbot):
436
+ initial_message = (" "
437
  )
438
  return chatbot + [(None, initial_message)]
439
 
 
516
 
517
 
518
  with gr.Blocks(css="""
519
+ :root {
 
 
 
520
  --background: #000000;
521
  --text: #FFFFFF;
522
+ }
523
+
524
+ body {
525
+ background: var(--background) !important;
526
+ color: var(--text) !important;
527
+ font-family: 'Inter', system-ui, sans-serif;
528
+ margin: 0 !important;
529
+ padding: 0 !important;
530
+ width: 100vw !important;
531
+ height: 100vh !important;
532
+ display: flex;
533
+ flex-direction: column;
534
+ }
535
+
536
+ .gradio-container {
537
+ max-width: 100% !important;
538
+ width: 100vw !important;
539
+ height: 100vh !important;
540
+ margin: 0 !important;
541
+ padding: 20px !important;
542
+ display: flex;
543
+ flex-direction: column;
544
+ }
545
+
546
+ .welcome-box, .chat-container, .gr-textbox, .bot {
547
+ background: var(--background) !important;
548
+ color: var(--text) !important;
549
+ border-radius: 12px !important;
550
+ padding: 2rem !important;
551
+ border: 1px solid rgba(255, 255, 255, 0.1) !important;
552
+ box-shadow: 0 4px 6px rgba(255, 255, 255, 0.05) !important;
553
+ }
554
+
555
+ .gr-button-primary {
556
+ background: var(--background) !important;
557
+ color: var(--text) !important;
558
+ padding: 12px 24px !important;
559
+ border-radius: 8px !important;
560
+ transition: all 0.3s ease !important;
561
+ border: 1px solid rgba(255, 255, 255, 0.1) !important;
562
+ }
563
+
564
+ .gr-button-primary:hover {
565
+ transform: translateY(-1px);
566
+ box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2) !important;
567
+ }
568
+
569
+ footer {
570
+ text-align: center !important;
571
+ color: var(--text) !important;
572
+ opacity: 0.7 !important;
573
+ padding: 1rem !important;
574
+ font-size: 0.9em !important;
575
+ }
576
+
577
+ .gr-markdown h3 {
578
+ color: var(--text) !important;
579
+ margin-bottom: 1rem !important;
580
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
581
 
582
 
583
  """) as demo: