Spaces:
Build error
Build error
Update app.py
Browse files
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 |
-
|
| 520 |
-
--primary: #10A37F;
|
| 521 |
-
--secondary: #19C99D;
|
| 522 |
-
--accent: #FF6B6B;
|
| 523 |
--background: #000000;
|
| 524 |
--text: #FFFFFF;
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
| 529 |
-
|
| 530 |
-
|
| 531 |
-
|
| 532 |
-
|
| 533 |
-
|
| 534 |
-
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
|
| 541 |
-
|
| 542 |
-
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
|
| 546 |
-
|
| 547 |
-
|
| 548 |
-
|
| 549 |
-
|
| 550 |
-
|
| 551 |
-
|
| 552 |
-
|
| 553 |
-
|
| 554 |
-
|
| 555 |
-
|
| 556 |
-
|
| 557 |
-
|
| 558 |
-
|
| 559 |
-
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
| 576 |
-
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 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:
|