Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- .gradioignore +33 -0
- .hfignore +25 -0
- gradio_interface.py +101 -2
.gradioignore
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Python Virtual Environment
|
| 2 |
+
venv/
|
| 3 |
+
venv/*
|
| 4 |
+
**/venv/
|
| 5 |
+
**/venv/*
|
| 6 |
+
|
| 7 |
+
# Python cache
|
| 8 |
+
__pycache__/
|
| 9 |
+
**/__pycache__/
|
| 10 |
+
|
| 11 |
+
# Environment files
|
| 12 |
+
.env
|
| 13 |
+
.venv/
|
| 14 |
+
env/
|
| 15 |
+
ENV/
|
| 16 |
+
|
| 17 |
+
# Mac specific
|
| 18 |
+
.DS_Store
|
| 19 |
+
|
| 20 |
+
# Git directory
|
| 21 |
+
.git/
|
| 22 |
+
|
| 23 |
+
# VSCode
|
| 24 |
+
.vscode/
|
| 25 |
+
|
| 26 |
+
# Python compiled files
|
| 27 |
+
*.pyc
|
| 28 |
+
*.pyo
|
| 29 |
+
*.pyd
|
| 30 |
+
__pycache__/
|
| 31 |
+
*.so
|
| 32 |
+
*.egg
|
| 33 |
+
*.egg-info/
|
.hfignore
CHANGED
|
@@ -1,8 +1,33 @@
|
|
| 1 |
# Python Virtual Environment
|
| 2 |
venv/
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Python cache
|
| 5 |
__pycache__/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# Mac specific
|
| 8 |
.DS_Store
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Python Virtual Environment
|
| 2 |
venv/
|
| 3 |
+
venv/*
|
| 4 |
+
**/venv/
|
| 5 |
+
**/venv/*
|
| 6 |
|
| 7 |
# Python cache
|
| 8 |
__pycache__/
|
| 9 |
+
**/__pycache__/
|
| 10 |
+
|
| 11 |
+
# Environment files
|
| 12 |
+
.env
|
| 13 |
+
.venv/
|
| 14 |
+
env/
|
| 15 |
+
ENV/
|
| 16 |
|
| 17 |
# Mac specific
|
| 18 |
.DS_Store
|
| 19 |
+
|
| 20 |
+
# Git directory
|
| 21 |
+
.git/
|
| 22 |
+
|
| 23 |
+
# VSCode
|
| 24 |
+
.vscode/
|
| 25 |
+
|
| 26 |
+
# Python compiled files
|
| 27 |
+
*.pyc
|
| 28 |
+
*.pyo
|
| 29 |
+
*.pyd
|
| 30 |
+
__pycache__/
|
| 31 |
+
*.so
|
| 32 |
+
*.egg
|
| 33 |
+
*.egg-info/
|
gradio_interface.py
CHANGED
|
@@ -53,18 +53,38 @@ LIGHT_MODE_CSS = """
|
|
| 53 |
font-weight: 400;
|
| 54 |
}
|
| 55 |
|
| 56 |
-
/*
|
| 57 |
-
.gr-textbox, .gr-textarea, input, textarea
|
|
|
|
|
|
|
|
|
|
| 58 |
background: #ffffff !important;
|
|
|
|
| 59 |
color: #1f2937 !important;
|
| 60 |
border: 1px solid #d1d5db !important;
|
| 61 |
border-radius: 6px !important;
|
| 62 |
}
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
.gr-textbox:focus, .gr-textarea:focus, input:focus, textarea:focus {
|
| 65 |
border-color: #3b82f6 !important;
|
| 66 |
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
|
| 67 |
outline: none !important;
|
|
|
|
|
|
|
| 68 |
}
|
| 69 |
|
| 70 |
/* Button styling */
|
|
@@ -191,6 +211,85 @@ h1, h2, h3, h4, h5, h6, p, div, span, li, ol, ul {
|
|
| 191 |
.gradio-container * {
|
| 192 |
color: #1f2937 !important;
|
| 193 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
"""
|
| 195 |
|
| 196 |
def format_results_html(result):
|
|
|
|
| 53 |
font-weight: 400;
|
| 54 |
}
|
| 55 |
|
| 56 |
+
/* Force light backgrounds for ALL input containers and elements */
|
| 57 |
+
.gr-textbox, .gr-textarea, input, textarea,
|
| 58 |
+
.gr-textbox *, .gr-textarea *,
|
| 59 |
+
.gr-textbox > div, .gr-textarea > div,
|
| 60 |
+
.gradio-textbox, .gradio-textarea {
|
| 61 |
background: #ffffff !important;
|
| 62 |
+
background-color: #ffffff !important;
|
| 63 |
color: #1f2937 !important;
|
| 64 |
border: 1px solid #d1d5db !important;
|
| 65 |
border-radius: 6px !important;
|
| 66 |
}
|
| 67 |
|
| 68 |
+
/* Force the container backgrounds to be light */
|
| 69 |
+
.gr-textbox, .gr-textarea {
|
| 70 |
+
background: #ffffff !important;
|
| 71 |
+
background-color: #ffffff !important;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
/* Force all child elements to have light backgrounds */
|
| 75 |
+
.gr-textbox > *, .gr-textarea > *,
|
| 76 |
+
.gr-textbox > div > *, .gr-textarea > div > * {
|
| 77 |
+
background: #ffffff !important;
|
| 78 |
+
background-color: #ffffff !important;
|
| 79 |
+
color: #1f2937 !important;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
.gr-textbox:focus, .gr-textarea:focus, input:focus, textarea:focus {
|
| 83 |
border-color: #3b82f6 !important;
|
| 84 |
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
|
| 85 |
outline: none !important;
|
| 86 |
+
background: #ffffff !important;
|
| 87 |
+
background-color: #ffffff !important;
|
| 88 |
}
|
| 89 |
|
| 90 |
/* Button styling */
|
|
|
|
| 211 |
.gradio-container * {
|
| 212 |
color: #1f2937 !important;
|
| 213 |
}
|
| 214 |
+
|
| 215 |
+
/* AGGRESSIVE LABEL VISIBILITY - Override all Gradio label styles */
|
| 216 |
+
.gr-label, .gr-label *, label, .label,
|
| 217 |
+
.gradio-textbox label, .gradio-textarea label,
|
| 218 |
+
[data-testid*="textbox"] label, [data-testid*="textarea"] label,
|
| 219 |
+
.gr-textbox .gr-label, .gr-textarea .gr-label,
|
| 220 |
+
.gr-textbox span[data-testid*="label"], .gr-textarea span[data-testid*="label"],
|
| 221 |
+
.gr-textbox .label, .gr-textarea .label,
|
| 222 |
+
.gr-form .gr-label, .gr-block .gr-label,
|
| 223 |
+
.gradio-container .gr-label, .gradio-container label,
|
| 224 |
+
.gr-textbox > span, .gr-textarea > span,
|
| 225 |
+
.gr-textbox > div > span, .gr-textarea > div > span,
|
| 226 |
+
.gr-textbox .svelte-*, .gr-textarea .svelte-*,
|
| 227 |
+
span[class*="label"], div[class*="label"],
|
| 228 |
+
.gr-textbox span:first-child, .gr-textarea span:first-child {
|
| 229 |
+
color: #1f2937 !important;
|
| 230 |
+
font-weight: 600 !important;
|
| 231 |
+
font-size: 1rem !important;
|
| 232 |
+
margin-bottom: 0.5rem !important;
|
| 233 |
+
display: block !important;
|
| 234 |
+
opacity: 1 !important;
|
| 235 |
+
visibility: visible !important;
|
| 236 |
+
background: transparent !important;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
/* Target Gradio's internal label structure more aggressively */
|
| 240 |
+
.gr-textbox > div:first-child, .gr-textarea > div:first-child,
|
| 241 |
+
.gr-textbox > div:first-child > *, .gr-textarea > div:first-child > *,
|
| 242 |
+
.gr-textbox .svelte-1gfkn6j, .gr-textarea .svelte-1gfkn6j,
|
| 243 |
+
.gr-textbox .svelte-*, .gr-textarea .svelte-* {
|
| 244 |
+
color: #1f2937 !important;
|
| 245 |
+
font-weight: 600 !important;
|
| 246 |
+
opacity: 1 !important;
|
| 247 |
+
visibility: visible !important;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
/* Force all possible label selectors */
|
| 251 |
+
.gradio-container [class*="label"],
|
| 252 |
+
.gradio-container [data-testid*="label"],
|
| 253 |
+
.gradio-container .gr-textbox *:first-child,
|
| 254 |
+
.gradio-container .gr-textarea *:first-child {
|
| 255 |
+
color: #1f2937 !important;
|
| 256 |
+
font-weight: 600 !important;
|
| 257 |
+
opacity: 1 !important;
|
| 258 |
+
visibility: visible !important;
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
/* Nuclear option - force ALL text in textbox containers to be visible */
|
| 262 |
+
.gr-textbox *, .gr-textarea * {
|
| 263 |
+
color: #1f2937 !important;
|
| 264 |
+
opacity: 1 !important;
|
| 265 |
+
visibility: visible !important;
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
/* NUCLEAR BACKGROUND OVERRIDE - Force all containers to be white */
|
| 269 |
+
.gr-textbox, .gr-textarea,
|
| 270 |
+
.gr-textbox *, .gr-textarea *,
|
| 271 |
+
.gr-textbox > div, .gr-textarea > div,
|
| 272 |
+
.gr-textbox > div > div, .gr-textarea > div > div,
|
| 273 |
+
.gr-textbox > div > div > div, .gr-textarea > div > div > div,
|
| 274 |
+
[class*="textbox"], [class*="textarea"],
|
| 275 |
+
[data-testid*="textbox"], [data-testid*="textarea"] {
|
| 276 |
+
background: #ffffff !important;
|
| 277 |
+
background-color: #ffffff !important;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
/* Override any blue/dark backgrounds specifically */
|
| 281 |
+
.gr-textbox [style*="background"], .gr-textarea [style*="background"],
|
| 282 |
+
.gr-textbox [style*="background-color"], .gr-textarea [style*="background-color"] {
|
| 283 |
+
background: #ffffff !important;
|
| 284 |
+
background-color: #ffffff !important;
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
/* Force white background on any element with blue/dark styling */
|
| 288 |
+
[style*="background: rgb("], [style*="background-color: rgb("],
|
| 289 |
+
[style*="background:#"], [style*="background-color:#"] {
|
| 290 |
+
background: #ffffff !important;
|
| 291 |
+
background-color: #ffffff !important;
|
| 292 |
+
}
|
| 293 |
"""
|
| 294 |
|
| 295 |
def format_results_html(result):
|