Nischal Subedi
commited on
Commit
·
b14d947
1
Parent(s):
9d5f183
UI
Browse files
app.py
CHANGED
@@ -570,33 +570,34 @@ Answer:"""
|
|
570 |
@media (prefers-color-scheme: light) {
|
571 |
.output-card .placeholder { border-color: var(--border-light); color: var(--text-secondary-light); }
|
572 |
}
|
573 |
-
|
|
|
574 |
border-radius: var(--radius-md) !important; border: 1px solid var(--border-dark) !important;
|
575 |
overflow: hidden; background: var(--card-section-bg-dark) !important;
|
576 |
box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
|
577 |
transition: border-color var(--transition-speed), background var(--transition-speed), box-shadow var(--transition-speed);
|
578 |
}
|
579 |
@media (prefers-color-scheme: light) {
|
580 |
-
.examples-section .gr-
|
581 |
}
|
582 |
-
.examples-section .gr-
|
583 |
-
.examples-section .gr-
|
584 |
background: var(--header-bg-dark) !important; color: var(--text-primary-dark) !important;
|
585 |
font-weight: 600 !important; text-align: left;
|
586 |
transition: background var(--transition-speed), color var(--transition-speed);
|
587 |
}
|
588 |
-
.examples-section .gr-
|
589 |
background: var(--card-section-bg-dark) !important; color: var(--text-primary-dark) !important;
|
590 |
border-top: 1px solid var(--border-dark) !important; cursor: pointer;
|
591 |
transition: background var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
|
592 |
}
|
593 |
-
.examples-section .gr-
|
594 |
-
.examples-section .gr-
|
595 |
@media (prefers-color-scheme: light) {
|
596 |
-
.examples-section .gr-
|
597 |
-
.examples-section .gr-
|
598 |
-
.examples-section .gr-
|
599 |
-
.examples-section .gr-
|
600 |
}
|
601 |
.app-footer-wrapper {
|
602 |
background: var(--header-bg-dark); border-top: 1px solid var(--border-dark) !important;
|
@@ -670,7 +671,7 @@ Answer:"""
|
|
670 |
.section-divider { margin: 1.8rem 0; } .input-row { gap: 1.5rem; } .input-field { min-width: 280px; }
|
671 |
.gradio-textbox textarea { min-height: 160px; } .output-card .response-header { font-size: 1.7rem; }
|
672 |
.examples-section { padding-top: 1.2rem; }
|
673 |
-
.examples-section .gr-
|
674 |
.app-footer-wrapper { margin-top: 0.6rem; border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); }
|
675 |
.app-footer { padding: 0 1.5rem !important; }
|
676 |
}
|
@@ -689,7 +690,7 @@ Answer:"""
|
|
689 |
.output-card .response-header { font-size: 1.5rem; } .output-card .response-icon { font-size: 1.7rem; }
|
690 |
.output-card .placeholder { padding: 2.5rem 1.5rem; font-size: 1.1rem; }
|
691 |
.examples-section { padding-top: 1.2rem; }
|
692 |
-
.examples-section .gr-
|
693 |
.app-footer-wrapper { margin-top: 0.6rem; border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); padding-top: 2rem; padding-bottom: 2rem; }
|
694 |
.app-footer { padding: 0 1rem !important; }
|
695 |
}
|
@@ -709,7 +710,7 @@ Answer:"""
|
|
709 |
.output-card .response-header { font-size: 1.4rem; } .output-card .response-icon { font-size: 1.5rem; }
|
710 |
.output-card .placeholder { padding: 2rem 1rem; font-size: 1.05rem; }
|
711 |
.examples-section { padding-top: 0.8rem; }
|
712 |
-
.examples-section .gr-
|
713 |
.app-footer-wrapper { margin-top: 0.4rem; border-top-left-radius: var(--radius-sm); border-top-right-radius: var(--radius-sm); padding-top: 1.5rem; padding-bottom: 1.5rem; }
|
714 |
.app-footer { padding: 0 0.8rem !important; }
|
715 |
}
|
@@ -786,8 +787,8 @@ Answer:"""
|
|
786 |
gr.Examples(
|
787 |
examples=example_queries, inputs=[query_input, state_input],
|
788 |
examples_per_page=5,
|
789 |
-
label=""
|
790 |
-
elem_classes=["gr-examples-table"]
|
791 |
)
|
792 |
else:
|
793 |
gr.Markdown("<div class='placeholder'>Sample questions could not be loaded.</div>")
|
|
|
570 |
@media (prefers-color-scheme: light) {
|
571 |
.output-card .placeholder { border-color: var(--border-light); color: var(--text-secondary-light); }
|
572 |
}
|
573 |
+
/* Target the table within the examples section directly */
|
574 |
+
.examples-section table.gr-samples-table { /* Updated selector based on common Gradio internal classes */
|
575 |
border-radius: var(--radius-md) !important; border: 1px solid var(--border-dark) !important;
|
576 |
overflow: hidden; background: var(--card-section-bg-dark) !important;
|
577 |
box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
|
578 |
transition: border-color var(--transition-speed), background var(--transition-speed), box-shadow var(--transition-speed);
|
579 |
}
|
580 |
@media (prefers-color-scheme: light) {
|
581 |
+
.examples-section table.gr-samples-table { border: 1px solid var(--border-light) !important; background: var(--card-section-bg-light) !important; box-shadow: inset 0 0 8px rgba(0,0,0,0.05); }
|
582 |
}
|
583 |
+
.examples-section table.gr-samples-table th, .examples-section table.gr-samples-table td { padding: 1rem 1.2rem !important; font-size: 1.05rem !important; border: none !important; }
|
584 |
+
.examples-section table.gr-samples-table th {
|
585 |
background: var(--header-bg-dark) !important; color: var(--text-primary-dark) !important;
|
586 |
font-weight: 600 !important; text-align: left;
|
587 |
transition: background var(--transition-speed), color var(--transition-speed);
|
588 |
}
|
589 |
+
.examples-section table.gr-samples-table td {
|
590 |
background: var(--card-section-bg-dark) !important; color: var(--text-primary-dark) !important;
|
591 |
border-top: 1px solid var(--border-dark) !important; cursor: pointer;
|
592 |
transition: background var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
|
593 |
}
|
594 |
+
.examples-section table.gr-samples-table tr:hover td { background: rgba(255, 193, 7, 0.1) !important; }
|
595 |
+
.examples-section table.gr-samples-table tr:first-child td { border-top: none !important; }
|
596 |
@media (prefers-color-scheme: light) {
|
597 |
+
.examples-section table.gr-samples-table { border: 1px solid var(--border-light) !important; background: var(--card-section-bg-light) !important; }
|
598 |
+
.examples-section table.gr-samples-table th { background: var(--header-bg-light) !important; color: var(--text-primary-light) !important; }
|
599 |
+
.examples-section table.gr-samples-table td { background: var(--card-section-bg-light) !important; color: var(--text-primary-light) !important; border-top: 1px solid var(--border-light) !important; }
|
600 |
+
.examples-section table.gr-samples-table tr:hover td { background: rgba(0, 123, 255, 0.08) !important; }
|
601 |
}
|
602 |
.app-footer-wrapper {
|
603 |
background: var(--header-bg-dark); border-top: 1px solid var(--border-dark) !important;
|
|
|
671 |
.section-divider { margin: 1.8rem 0; } .input-row { gap: 1.5rem; } .input-field { min-width: 280px; }
|
672 |
.gradio-textbox textarea { min-height: 160px; } .output-card .response-header { font-size: 1.7rem; }
|
673 |
.examples-section { padding-top: 1.2rem; }
|
674 |
+
.examples-section table.gr-samples-table th, .examples-section table.gr-samples-table td { padding: 0.9rem 1.1rem !important; }
|
675 |
.app-footer-wrapper { margin-top: 0.6rem; border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); }
|
676 |
.app-footer { padding: 0 1.5rem !important; }
|
677 |
}
|
|
|
690 |
.output-card .response-header { font-size: 1.5rem; } .output-card .response-icon { font-size: 1.7rem; }
|
691 |
.output-card .placeholder { padding: 2.5rem 1.5rem; font-size: 1.1rem; }
|
692 |
.examples-section { padding-top: 1.2rem; }
|
693 |
+
.examples-section table.gr-samples-table th, .examples-section table.gr-samples-table td { padding: 0.9rem 1.1rem !important; font-size: 1.0rem !important; }
|
694 |
.app-footer-wrapper { margin-top: 0.6rem; border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); padding-top: 2rem; padding-bottom: 2rem; }
|
695 |
.app-footer { padding: 0 1rem !important; }
|
696 |
}
|
|
|
710 |
.output-card .response-header { font-size: 1.4rem; } .output-card .response-icon { font-size: 1.5rem; }
|
711 |
.output-card .placeholder { padding: 2rem 1rem; font-size: 1.05rem; }
|
712 |
.examples-section { padding-top: 0.8rem; }
|
713 |
+
.examples-section table.gr-samples-table th, .examples-section table.gr-samples-table td { padding: 0.6rem 0.8rem !important; font-size: 0.95rem !important; }
|
714 |
.app-footer-wrapper { margin-top: 0.4rem; border-top-left-radius: var(--radius-sm); border-top-right-radius: var(--radius-sm); padding-top: 1.5rem; padding-bottom: 1.5rem; }
|
715 |
.app-footer { padding: 0 0.8rem !important; }
|
716 |
}
|
|
|
787 |
gr.Examples(
|
788 |
examples=example_queries, inputs=[query_input, state_input],
|
789 |
examples_per_page=5,
|
790 |
+
label="" # Label hidden by CSS
|
791 |
+
# Removed: elem_classes=["gr-examples-table"]
|
792 |
)
|
793 |
else:
|
794 |
gr.Markdown("<div class='placeholder'>Sample questions could not be loaded.</div>")
|