Update app.py
Browse files
app.py
CHANGED
|
@@ -79,13 +79,14 @@ def create_treemap(treemap_data, count_by, title=None):
|
|
| 79 |
|
| 80 |
# --- FINAL FIX: Use CSS to target and fix the specific visual issues ---
|
| 81 |
custom_css = """
|
| 82 |
-
/* Target
|
| 83 |
-
.
|
| 84 |
border: none !important;
|
| 85 |
background: none !important;
|
| 86 |
box-shadow: none !important;
|
| 87 |
-
padding:
|
| 88 |
}
|
|
|
|
| 89 |
/* Target the min/max number labels within the RangeSlider component and hide them */
|
| 90 |
#param-slider-wrapper div[data-testid="range-slider"] > span {
|
| 91 |
display: none !important;
|
|
@@ -114,7 +115,7 @@ with gr.Blocks(title="🤗 ModelVerse Explorer", fill_width=True, css=custom_css
|
|
| 114 |
pipeline_filter_dropdown = gr.Dropdown(label="Select Pipeline Tag", choices=PIPELINE_TAGS, value=None, visible=False)
|
| 115 |
|
| 116 |
# This group's styling will be modified by the custom CSS
|
| 117 |
-
with gr.Group():
|
| 118 |
gr.Markdown("<div style='font-weight: 500;'>Model Parameters</div>")
|
| 119 |
param_range_slider = RangeSlider(
|
| 120 |
minimum=0,
|
|
|
|
| 79 |
|
| 80 |
# --- FINAL FIX: Use CSS to target and fix the specific visual issues ---
|
| 81 |
custom_css = """
|
| 82 |
+
/* Target our custom group class, remove its background, and set padding */
|
| 83 |
+
.param-slider-group {
|
| 84 |
border: none !important;
|
| 85 |
background: none !important;
|
| 86 |
box-shadow: none !important;
|
| 87 |
+
padding: 5px !important;
|
| 88 |
}
|
| 89 |
+
|
| 90 |
/* Target the min/max number labels within the RangeSlider component and hide them */
|
| 91 |
#param-slider-wrapper div[data-testid="range-slider"] > span {
|
| 92 |
display: none !important;
|
|
|
|
| 115 |
pipeline_filter_dropdown = gr.Dropdown(label="Select Pipeline Tag", choices=PIPELINE_TAGS, value=None, visible=False)
|
| 116 |
|
| 117 |
# This group's styling will be modified by the custom CSS
|
| 118 |
+
with gr.Group(elem_classes="param-slider-group"):
|
| 119 |
gr.Markdown("<div style='font-weight: 500;'>Model Parameters</div>")
|
| 120 |
param_range_slider = RangeSlider(
|
| 121 |
minimum=0,
|