Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
937cf33
1
Parent(s):
e225f06
update
Browse files
app.py
CHANGED
|
@@ -832,17 +832,114 @@ def basic_get_scores_and_sources(
|
|
| 832 |
)
|
| 833 |
|
| 834 |
def load_custom_css():
|
| 835 |
-
"""Load CSS
|
| 836 |
-
|
| 837 |
-
|
| 838 |
-
|
| 839 |
-
|
| 840 |
-
|
| 841 |
-
|
| 842 |
-
|
| 843 |
-
|
| 844 |
-
|
| 845 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 846 |
|
| 847 |
# Load CSS from external file
|
| 848 |
custom_css = load_custom_css()
|
|
|
|
| 832 |
)
|
| 833 |
|
| 834 |
def load_custom_css():
|
| 835 |
+
"""Load CSS - embedded version for Hugging Face Spaces compatibility"""
|
| 836 |
+
css_content = """
|
| 837 |
+
/* Add global page margins */
|
| 838 |
+
.gradio-container {
|
| 839 |
+
padding-left: 12rem !important;
|
| 840 |
+
padding-right: 12rem !important;
|
| 841 |
+
}
|
| 842 |
+
|
| 843 |
+
/* App title styling */
|
| 844 |
+
.app-title {
|
| 845 |
+
text-align: center !important;
|
| 846 |
+
margin: 2rem 0 !important;
|
| 847 |
+
}
|
| 848 |
+
|
| 849 |
+
.app-title .brand {
|
| 850 |
+
color: #333333 !important;
|
| 851 |
+
font-weight: 700 !important;
|
| 852 |
+
font-size: 3rem !important;
|
| 853 |
+
margin-right: 12px !important;
|
| 854 |
+
}
|
| 855 |
+
|
| 856 |
+
.app-title .subtitle {
|
| 857 |
+
color: #666666 !important;
|
| 858 |
+
font-weight: 400 !important;
|
| 859 |
+
font-size: 1.6rem !important;
|
| 860 |
+
display: block !important;
|
| 861 |
+
margin-top: 12px !important;
|
| 862 |
+
}
|
| 863 |
+
|
| 864 |
+
/* App description styling */
|
| 865 |
+
.app-description p {
|
| 866 |
+
font-size: 1.25rem !important;
|
| 867 |
+
color: #555555 !important;
|
| 868 |
+
line-height: 1.6 !important;
|
| 869 |
+
}
|
| 870 |
+
|
| 871 |
+
/* Feature highlights */
|
| 872 |
+
.feature-highlights {
|
| 873 |
+
font-size: 1.1rem !important;
|
| 874 |
+
color: #444444 !important;
|
| 875 |
+
line-height: 1.5 !important;
|
| 876 |
+
}
|
| 877 |
+
|
| 878 |
+
/* Example title */
|
| 879 |
+
.example-title {
|
| 880 |
+
text-align: center !important;
|
| 881 |
+
margin: 2rem 0 1rem 0 !important;
|
| 882 |
+
font-size: 1.5rem !important;
|
| 883 |
+
font-weight: 600 !important;
|
| 884 |
+
color: #333333 !important;
|
| 885 |
+
}
|
| 886 |
+
|
| 887 |
+
/* Example button container */
|
| 888 |
+
.example-button-container {
|
| 889 |
+
display: flex !important;
|
| 890 |
+
justify-content: center !important;
|
| 891 |
+
align-items: center !important;
|
| 892 |
+
gap: 1rem !important;
|
| 893 |
+
margin: 1rem 0 !important;
|
| 894 |
+
flex-wrap: wrap !important;
|
| 895 |
+
}
|
| 896 |
+
|
| 897 |
+
/* Example buttons */
|
| 898 |
+
.example-button button {
|
| 899 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
| 900 |
+
color: white !important;
|
| 901 |
+
border: none !important;
|
| 902 |
+
border-radius: 10px !important;
|
| 903 |
+
padding: 12px 20px !important;
|
| 904 |
+
font-size: 0.9rem !important;
|
| 905 |
+
font-weight: 600 !important;
|
| 906 |
+
cursor: pointer !important;
|
| 907 |
+
transition: all 0.3s ease !important;
|
| 908 |
+
box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
|
| 909 |
+
min-width: 200px !important;
|
| 910 |
+
text-align: center !important;
|
| 911 |
+
}
|
| 912 |
+
|
| 913 |
+
.example-button button:hover {
|
| 914 |
+
transform: translateY(-2px) !important;
|
| 915 |
+
box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
|
| 916 |
+
}
|
| 917 |
+
|
| 918 |
+
/* Responsive design */
|
| 919 |
+
@media (max-width: 768px) {
|
| 920 |
+
.gradio-container {
|
| 921 |
+
padding-left: 1rem !important;
|
| 922 |
+
padding-right: 1rem !important;
|
| 923 |
+
}
|
| 924 |
+
|
| 925 |
+
.app-title .brand {
|
| 926 |
+
font-size: 2rem !important;
|
| 927 |
+
}
|
| 928 |
+
|
| 929 |
+
.app-title .subtitle {
|
| 930 |
+
font-size: 1.2rem !important;
|
| 931 |
+
}
|
| 932 |
+
|
| 933 |
+
.example-button-container {
|
| 934 |
+
flex-direction: column !important;
|
| 935 |
+
}
|
| 936 |
+
|
| 937 |
+
.example-button button {
|
| 938 |
+
min-width: 100% !important;
|
| 939 |
+
}
|
| 940 |
+
}
|
| 941 |
+
"""
|
| 942 |
+
return css_content
|
| 943 |
|
| 944 |
# Load CSS from external file
|
| 945 |
custom_css = load_custom_css()
|