Spaces:
Runtime error
Runtime error
Updated css.
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# app.py - Enhanced Professional UI
|
| 2 |
import gradio as gr
|
| 3 |
import requests
|
| 4 |
import json
|
|
@@ -200,7 +200,7 @@ def test_service():
|
|
| 200 |
except Exception as e:
|
| 201 |
return f"β **Test Error**: {str(e)}"
|
| 202 |
|
| 203 |
-
#
|
| 204 |
custom_css = """
|
| 205 |
/* Global container styling */
|
| 206 |
.gradio-container {
|
|
@@ -289,7 +289,7 @@ custom_css = """
|
|
| 289 |
}
|
| 290 |
|
| 291 |
.form-section h3 {
|
| 292 |
-
color: #
|
| 293 |
font-weight: 700 !important;
|
| 294 |
font-size: 1.5rem !important;
|
| 295 |
margin-bottom: 1.5rem !important;
|
|
@@ -298,8 +298,8 @@ custom_css = """
|
|
| 298 |
gap: 0.75rem !important;
|
| 299 |
}
|
| 300 |
|
| 301 |
-
/* Input styling */
|
| 302 |
-
|
| 303 |
border-radius: 12px !important;
|
| 304 |
border: 2px solid #e5e7eb !important;
|
| 305 |
transition: all 0.3s ease !important;
|
|
@@ -307,35 +307,15 @@ custom_css = """
|
|
| 307 |
padding: 0.75rem 1rem !important;
|
| 308 |
}
|
| 309 |
|
| 310 |
-
|
| 311 |
border-color: #667eea !important;
|
| 312 |
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
|
| 313 |
outline: none !important;
|
| 314 |
}
|
| 315 |
|
| 316 |
-
/*
|
| 317 |
-
.gradio-dropdown
|
| 318 |
-
|
| 319 |
-
border: 2px solid #e5e7eb !important;
|
| 320 |
-
transition: all 0.3s ease !important;
|
| 321 |
-
}
|
| 322 |
-
|
| 323 |
-
.gradio-dropdown .wrap:focus-within {
|
| 324 |
-
border-color: #667eea !important;
|
| 325 |
-
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
|
| 326 |
-
}
|
| 327 |
-
|
| 328 |
-
.gradio-dropdown select, .gradio-dropdown input {
|
| 329 |
-
font-size: 1rem !important;
|
| 330 |
-
padding: 0.75rem 1rem !important;
|
| 331 |
-
border: none !important;
|
| 332 |
-
background: transparent !important;
|
| 333 |
-
}
|
| 334 |
-
|
| 335 |
-
.gradio-dropdown .dropdown {
|
| 336 |
-
border-radius: 12px !important;
|
| 337 |
-
border: 2px solid #e5e7eb !important;
|
| 338 |
-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
|
| 339 |
}
|
| 340 |
|
| 341 |
/* Button styling */
|
|
@@ -396,7 +376,7 @@ custom_css = """
|
|
| 396 |
}
|
| 397 |
|
| 398 |
.tips-section h4 {
|
| 399 |
-
color: #
|
| 400 |
font-weight: 700 !important;
|
| 401 |
margin-bottom: 1rem !important;
|
| 402 |
}
|
|
@@ -505,7 +485,9 @@ with gr.Blocks(
|
|
| 505 |
choices=["20s", "30s", "40s", "50s+"],
|
| 506 |
label="π
Age Group",
|
| 507 |
value="30s",
|
| 508 |
-
info="Your current life stage affects investment timeline"
|
|
|
|
|
|
|
| 509 |
)
|
| 510 |
|
| 511 |
country = gr.Dropdown(
|
|
@@ -515,7 +497,9 @@ with gr.Blocks(
|
|
| 515 |
],
|
| 516 |
label="π Country of Residence",
|
| 517 |
value="United States",
|
| 518 |
-
info="Tax jurisdiction for investment recommendations"
|
|
|
|
|
|
|
| 519 |
)
|
| 520 |
|
| 521 |
# Financial Information Section
|
|
|
|
| 1 |
+
# app.py - Enhanced Professional UI with Fixed Dropdowns
|
| 2 |
import gradio as gr
|
| 3 |
import requests
|
| 4 |
import json
|
|
|
|
| 200 |
except Exception as e:
|
| 201 |
return f"β **Test Error**: {str(e)}"
|
| 202 |
|
| 203 |
+
# Fixed CSS - Removed problematic dropdown overrides
|
| 204 |
custom_css = """
|
| 205 |
/* Global container styling */
|
| 206 |
.gradio-container {
|
|
|
|
| 289 |
}
|
| 290 |
|
| 291 |
.form-section h3 {
|
| 292 |
+
color: #1e3c72 !important;
|
| 293 |
font-weight: 700 !important;
|
| 294 |
font-size: 1.5rem !important;
|
| 295 |
margin-bottom: 1.5rem !important;
|
|
|
|
| 298 |
gap: 0.75rem !important;
|
| 299 |
}
|
| 300 |
|
| 301 |
+
/* Input styling - only for textboxes and numbers, NOT dropdowns */
|
| 302 |
+
input[type="text"], input[type="number"], textarea {
|
| 303 |
border-radius: 12px !important;
|
| 304 |
border: 2px solid #e5e7eb !important;
|
| 305 |
transition: all 0.3s ease !important;
|
|
|
|
| 307 |
padding: 0.75rem 1rem !important;
|
| 308 |
}
|
| 309 |
|
| 310 |
+
input[type="text"]:focus, input[type="number"]:focus, textarea:focus {
|
| 311 |
border-color: #667eea !important;
|
| 312 |
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
|
| 313 |
outline: none !important;
|
| 314 |
}
|
| 315 |
|
| 316 |
+
/* Minimal dropdown styling - let Gradio handle the functionality */
|
| 317 |
+
.gradio-dropdown {
|
| 318 |
+
margin-bottom: 1rem !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 319 |
}
|
| 320 |
|
| 321 |
/* Button styling */
|
|
|
|
| 376 |
}
|
| 377 |
|
| 378 |
.tips-section h4 {
|
| 379 |
+
color: #1e3c72 !important;
|
| 380 |
font-weight: 700 !important;
|
| 381 |
margin-bottom: 1rem !important;
|
| 382 |
}
|
|
|
|
| 485 |
choices=["20s", "30s", "40s", "50s+"],
|
| 486 |
label="π
Age Group",
|
| 487 |
value="30s",
|
| 488 |
+
info="Your current life stage affects investment timeline",
|
| 489 |
+
interactive=True,
|
| 490 |
+
show_label=True
|
| 491 |
)
|
| 492 |
|
| 493 |
country = gr.Dropdown(
|
|
|
|
| 497 |
],
|
| 498 |
label="π Country of Residence",
|
| 499 |
value="United States",
|
| 500 |
+
info="Tax jurisdiction for investment recommendations",
|
| 501 |
+
interactive=True,
|
| 502 |
+
show_label=True
|
| 503 |
)
|
| 504 |
|
| 505 |
# Financial Information Section
|