Spaces:
Sleeping
Sleeping
Commit
·
b5afdc4
1
Parent(s):
5ce8a01
Update: interface font update
Browse files
app.py
CHANGED
@@ -47,22 +47,19 @@ 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
|
55 |
gr.HTML("""
|
56 |
<style>
|
57 |
body {
|
58 |
background-color: black;
|
59 |
-
color:
|
60 |
}
|
61 |
.gradio-container {
|
62 |
-
color:
|
63 |
-
}
|
64 |
-
h1, h2, h3, h4, h5, h6, p, label {
|
65 |
-
color: white; /* Make all headings and labels white */
|
66 |
}
|
67 |
</style>
|
68 |
""")
|
@@ -77,7 +74,7 @@ with gr.Blocks() as interface:
|
|
77 |
value=default_sample, # Set default selection
|
78 |
)
|
79 |
# Upload image below sample selection
|
80 |
-
gr.Markdown("
|
81 |
upload_image = gr.Image(
|
82 |
label="Upload an Image",
|
83 |
type="pil", # Correct type for file path compatibility
|
|
|
47 |
return result_images
|
48 |
|
49 |
with gr.Blocks() as interface:
|
50 |
+
gr.Markdown("# <span style='color:white'>XAI: Visualize Object Detection of Your Models</span>")
|
51 |
+
gr.Markdown("<span style='color:white'>Select a sample image to visualize object detection.</span>")
|
52 |
default_sample = "Sample 1"
|
53 |
|
54 |
+
# Inject CSS with gr.HTML to set the text color to red
|
55 |
gr.HTML("""
|
56 |
<style>
|
57 |
body {
|
58 |
background-color: black;
|
59 |
+
color: red; /* Set text color to red */
|
60 |
}
|
61 |
.gradio-container {
|
62 |
+
color: red; /* Ensure Gradio components also have red text */
|
|
|
|
|
|
|
63 |
}
|
64 |
</style>
|
65 |
""")
|
|
|
74 |
value=default_sample, # Set default selection
|
75 |
)
|
76 |
# Upload image below sample selection
|
77 |
+
gr.Markdown("<span style='color:white'>**Or upload your own image:**</span>")
|
78 |
upload_image = gr.Image(
|
79 |
label="Upload an Image",
|
80 |
type="pil", # Correct type for file path compatibility
|