BhumikaMak commited on
Commit
7838123
·
1 Parent(s): 5325ebe

Update: font styling

Browse files
Files changed (1) hide show
  1. app.py +12 -9
app.py CHANGED
@@ -47,26 +47,30 @@ def process_image(sample_choice, uploaded_image, yolo_versions=["yolov5"]):
47
  return result_images
48
 
49
  with gr.Blocks() as interface:
50
- gr.Markdown("# XAI: Visualize Object Detection of Your Models")
51
- gr.Markdown("Select a sample image to visualize object detection.")
52
- default_sample = "Sample 1"
53
-
54
- # Inject CSS with gr.HTML to set the text color to white
55
  gr.HTML("""
56
  <style>
57
  body {
58
  background-color: black;
59
- color: white; /* Set text color to white */
60
  }
61
  .gradio-container {
62
- color: white; /* Ensure Gradio components also have white text */
63
  }
64
  h1, h2, h3, h4, h5, h6, p, label {
65
- color: white; /* Make all headings and labels white */
 
 
 
 
66
  }
67
  </style>
68
  """)
69
 
 
 
 
 
70
  with gr.Row(elem_classes="orchid-green-bg"):
71
  # Left side: Sample selection and upload image
72
  with gr.Column():
@@ -107,5 +111,4 @@ with gr.Blocks() as interface:
107
  outputs=result_gallery,
108
  )
109
 
110
- # Launch the interface without the `css` argument
111
  interface.launch(share=True)
 
47
  return result_images
48
 
49
  with gr.Blocks() as interface:
50
+ # Update CSS to make gr.Markdown text white
 
 
 
 
51
  gr.HTML("""
52
  <style>
53
  body {
54
  background-color: black;
55
+ color: white;
56
  }
57
  .gradio-container {
58
+ color: white;
59
  }
60
  h1, h2, h3, h4, h5, h6, p, label {
61
+ color: white;
62
+ }
63
+ /* Specific rule for Markdown content */
64
+ .gr-markdown {
65
+ color: white !important;
66
  }
67
  </style>
68
  """)
69
 
70
+ gr.Markdown("# XAI: Visualize Object Detection of Your Models")
71
+ gr.Markdown("Select a sample image to visualize object detection.")
72
+ default_sample = "Sample 1"
73
+
74
  with gr.Row(elem_classes="orchid-green-bg"):
75
  # Left side: Sample selection and upload image
76
  with gr.Column():
 
111
  outputs=result_gallery,
112
  )
113
 
 
114
  interface.launch(share=True)