Spaces:
Sleeping
Sleeping
Commit
·
b084599
1
Parent(s):
f980a4a
better python syntax hightlighting
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ class Config:
|
|
| 27 |
|
| 28 |
Your task is to generate a helpful response to the user's query about using FiftyOne, and provide the appropriate function calls and class methods so that the user can understand how to use FiftyOne to achieve their goal.
|
| 29 |
|
| 30 |
-
Responses should be
|
| 31 |
|
| 32 |
def __repr__(self):
|
| 33 |
"""Secure representation that doesn't leak credentials."""
|
|
@@ -548,6 +548,78 @@ def create_demo():
|
|
| 548 |
::-webkit-scrollbar-thumb:hover {
|
| 549 |
background: #e55d03 !important;
|
| 550 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 551 |
"""
|
| 552 |
|
| 553 |
# Create theme with light mode base
|
|
|
|
| 27 |
|
| 28 |
Your task is to generate a helpful response to the user's query about using FiftyOne, and provide the appropriate function calls and class methods so that the user can understand how to use FiftyOne to achieve their goal.
|
| 29 |
|
| 30 |
+
Responses should be thorough, complete, helpful, and include required syntax to achieve the user's goal in FiftyOne."""
|
| 31 |
|
| 32 |
def __repr__(self):
|
| 33 |
"""Secure representation that doesn't leak credentials."""
|
|
|
|
| 548 |
::-webkit-scrollbar-thumb:hover {
|
| 549 |
background: #e55d03 !important;
|
| 550 |
}
|
| 551 |
+
|
| 552 |
+
/* Code block styling with Python syntax highlighting */
|
| 553 |
+
pre, code {
|
| 554 |
+
background-color: #f8f8f8 !important;
|
| 555 |
+
border: 1px solid #e1e1e8 !important;
|
| 556 |
+
border-radius: 4px !important;
|
| 557 |
+
font-family: "Consolas", "Monaco", "Courier New", monospace !important;
|
| 558 |
+
padding: 0.2em 0.4em !important;
|
| 559 |
+
font-size: 0.9em !important;
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
pre {
|
| 563 |
+
padding: 0.8em 1em !important;
|
| 564 |
+
overflow-x: auto !important;
|
| 565 |
+
line-height: 1.45 !important;
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
pre code {
|
| 569 |
+
background: none !important;
|
| 570 |
+
border: none !important;
|
| 571 |
+
padding: 0 !important;
|
| 572 |
+
font-size: inherit !important;
|
| 573 |
+
}
|
| 574 |
+
|
| 575 |
+
/* Python syntax highlighting */
|
| 576 |
+
.language-python .keyword,
|
| 577 |
+
.language-python .builtin {
|
| 578 |
+
color: #0086b3 !important; /* keywords and built-ins */
|
| 579 |
+
}
|
| 580 |
+
|
| 581 |
+
.language-python .string {
|
| 582 |
+
color: #183691 !important; /* strings */
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
.language-python .number {
|
| 586 |
+
color: #0086b3 !important; /* numbers */
|
| 587 |
+
}
|
| 588 |
+
|
| 589 |
+
.language-python .comment {
|
| 590 |
+
color: #969896 !important; /* comments */
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
+
.language-python .function,
|
| 594 |
+
.language-python .class {
|
| 595 |
+
color: #795da3 !important; /* functions and classes */
|
| 596 |
+
}
|
| 597 |
+
|
| 598 |
+
.language-python .operator {
|
| 599 |
+
color: #a71d5d !important; /* operators */
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
/* Make code blocks in chatbot messages look nice */
|
| 603 |
+
.message-bubble-border pre {
|
| 604 |
+
background-color: #f8f8f8 !important;
|
| 605 |
+
border-radius: 8px !important;
|
| 606 |
+
border: 1px solid #e1e1e8 !important;
|
| 607 |
+
margin: 0.5em 0 !important;
|
| 608 |
+
}
|
| 609 |
+
|
| 610 |
+
.message-bubble-border code {
|
| 611 |
+
font-family: "Consolas", "Monaco", "Courier New", monospace !important;
|
| 612 |
+
}
|
| 613 |
+
|
| 614 |
+
/* For block code in user messages (dark background) */
|
| 615 |
+
.user .message-bubble-border pre {
|
| 616 |
+
background-color: rgba(255, 255, 255, 0.1) !important;
|
| 617 |
+
border: 1px solid rgba(255, 255, 255, 0.2) !important;
|
| 618 |
+
}
|
| 619 |
+
|
| 620 |
+
.user .message-bubble-border code {
|
| 621 |
+
color: #f8f8f8 !important;
|
| 622 |
+
}
|
| 623 |
"""
|
| 624 |
|
| 625 |
# Create theme with light mode base
|