Spaces:
Build error
Build error
Fix card header colors and content containment
Browse files- Fixed card headers to display white text on blue background
- Ensured classification results appear properly in white card content area
- Ensured example buttons are contained within white card content area
- Added CSS rule to force all card header text to be white
- Improved card content structure and containment
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
|
@@ -173,6 +173,9 @@ with gr.Blocks(
|
|
| 173 |
font-weight: 600 !important;
|
| 174 |
font-size: 1.1rem !important;
|
| 175 |
}
|
|
|
|
|
|
|
|
|
|
| 176 |
.card-content {
|
| 177 |
padding: 1.5rem !important;
|
| 178 |
color: #374151 !important;
|
|
@@ -323,24 +326,25 @@ with gr.Blocks(
|
|
| 323 |
</div>
|
| 324 |
""")
|
| 325 |
|
| 326 |
-
gr.
|
| 327 |
-
|
| 328 |
-
<div class="card
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
|
|
|
|
|
|
| 341 |
</div>
|
| 342 |
-
|
| 343 |
-
""")
|
| 344 |
|
| 345 |
# Set up event handlers
|
| 346 |
classify_btn.click(
|
|
|
|
| 173 |
font-weight: 600 !important;
|
| 174 |
font-size: 1.1rem !important;
|
| 175 |
}
|
| 176 |
+
.card-header * {
|
| 177 |
+
color: white !important;
|
| 178 |
+
}
|
| 179 |
.card-content {
|
| 180 |
padding: 1.5rem !important;
|
| 181 |
color: #374151 !important;
|
|
|
|
| 326 |
</div>
|
| 327 |
""")
|
| 328 |
|
| 329 |
+
with gr.Column():
|
| 330 |
+
gr.HTML("""
|
| 331 |
+
<div class="card">
|
| 332 |
+
<div class="card-header">
|
| 333 |
+
Classification Results
|
| 334 |
+
</div>
|
| 335 |
+
<div class="card-content">
|
| 336 |
+
""")
|
| 337 |
+
|
| 338 |
+
output_text = gr.Markdown(
|
| 339 |
+
value="Upload an image to see predictions...",
|
| 340 |
+
label="",
|
| 341 |
+
elem_classes=["results-text"]
|
| 342 |
+
)
|
| 343 |
+
|
| 344 |
+
gr.HTML("""
|
| 345 |
+
</div>
|
| 346 |
</div>
|
| 347 |
+
""")
|
|
|
|
| 348 |
|
| 349 |
# Set up event handlers
|
| 350 |
classify_btn.click(
|