Spaces:
Running
Running
Update ui/ui_generators.py
Browse files- ui/ui_generators.py +9 -3
ui/ui_generators.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
"""
|
| 2 |
Generates HTML content and Matplotlib plots for the Gradio UI tabs,
|
| 3 |
-
and UI components for the Analytics tab.
|
| 4 |
"""
|
| 5 |
import pandas as pd
|
| 6 |
import logging
|
|
@@ -41,8 +41,13 @@ def build_home_tab_ui():
|
|
| 41 |
associare gestori di click per la navigazione tra le schede.
|
| 42 |
"""
|
| 43 |
# CSS personalizzato per uno stile migliorato
|
|
|
|
| 44 |
css_styles = """
|
| 45 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
.hero-section {
|
| 47 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 48 |
padding: 60px 40px;
|
|
@@ -728,6 +733,7 @@ def create_enhanced_report_tab(agentic_modules_loaded_status: bool):
|
|
| 728 |
"""
|
| 729 |
|
| 730 |
# Custom CSS for Medium-style design
|
|
|
|
| 731 |
report_css = """
|
| 732 |
<style>
|
| 733 |
/* Medium-style Report Container */
|
|
@@ -735,7 +741,7 @@ def create_enhanced_report_tab(agentic_modules_loaded_status: bool):
|
|
| 735 |
max-width: 800px;
|
| 736 |
margin: 0 auto;
|
| 737 |
padding: 40px 20px;
|
| 738 |
-
font-family:
|
| 739 |
line-height: 1.6;
|
| 740 |
color: #292929;
|
| 741 |
background: #ffffff;
|
|
@@ -900,7 +906,7 @@ def create_enhanced_report_tab(agentic_modules_loaded_status: bool):
|
|
| 900 |
background: #f1f3f4;
|
| 901 |
padding: 2px 6px;
|
| 902 |
border-radius: 4px;
|
| 903 |
-
font-family: '
|
| 904 |
font-size: 0.9em;
|
| 905 |
color: #d73a49;
|
| 906 |
}
|
|
|
|
| 1 |
"""
|
| 2 |
Generates HTML content and Matplotlib plots for the Gradio UI tabs,
|
| 3 |
+
and UI components for the Analytics tab, ensuring consistent font usage.
|
| 4 |
"""
|
| 5 |
import pandas as pd
|
| 6 |
import logging
|
|
|
|
| 41 |
associare gestori di click per la navigazione tra le schede.
|
| 42 |
"""
|
| 43 |
# CSS personalizzato per uno stile migliorato
|
| 44 |
+
# FONT CORRECTION: Added a 'body' style to set a consistent sans-serif font across the app.
|
| 45 |
css_styles = """
|
| 46 |
<style>
|
| 47 |
+
body {
|
| 48 |
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
.hero-section {
|
| 52 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 53 |
padding: 60px 40px;
|
|
|
|
| 733 |
"""
|
| 734 |
|
| 735 |
# Custom CSS for Medium-style design
|
| 736 |
+
# FONT CORRECTION: Changed font-family from a serif stack to a standard sans-serif stack for consistency.
|
| 737 |
report_css = """
|
| 738 |
<style>
|
| 739 |
/* Medium-style Report Container */
|
|
|
|
| 741 |
max-width: 800px;
|
| 742 |
margin: 0 auto;
|
| 743 |
padding: 40px 20px;
|
| 744 |
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
| 745 |
line-height: 1.6;
|
| 746 |
color: #292929;
|
| 747 |
background: #ffffff;
|
|
|
|
| 906 |
background: #f1f3f4;
|
| 907 |
padding: 2px 6px;
|
| 908 |
border-radius: 4px;
|
| 909 |
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
| 910 |
font-size: 0.9em;
|
| 911 |
color: #d73a49;
|
| 912 |
}
|