Jahnavibh Claude commited on
Commit
a29f1c6
·
1 Parent(s): 33aa3de

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>

Files changed (1) hide show
  1. app.py +21 -17
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.HTML("""
327
- <div class="card">
328
- <div class="card-header">
329
- Classification Results
330
- </div>
331
- <div class="card-content">
332
- """)
333
-
334
- output_text = gr.Markdown(
335
- value="Upload an image to see predictions...",
336
- label="",
337
- elem_classes=["results-text"]
338
- )
339
-
340
- gr.HTML("""
 
 
341
  </div>
342
- </div>
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(