Spaces:
Running
Running
Joschka Strueber
commited on
Commit
·
4077e51
1
Parent(s):
bd28414
[Ref] apply custom css to heatmap, increase size of images
Browse files- app.py +2 -2
- src/app_util.py +2 -2
app.py
CHANGED
@@ -21,7 +21,7 @@ metric_init = "CAPA"
|
|
21 |
with gr.Blocks(title="LLM Similarity Analyzer", css=app_util.custom_css) as demo:
|
22 |
gr.Markdown("# Model Similarity Comparison Tool")
|
23 |
gr.Markdown(links_markdown)
|
24 |
-
gr.Markdown('
|
25 |
|
26 |
with gr.Row():
|
27 |
dataset_dropdown = gr.Dropdown(
|
@@ -57,7 +57,7 @@ with gr.Blocks(title="LLM Similarity Analyzer", css=app_util.custom_css) as demo
|
|
57 |
)
|
58 |
|
59 |
generate_btn = gr.Button("Generate Heatmap", variant="primary")
|
60 |
-
heatmap = gr.Image(value=app_util.create_heatmap(model_init, dataset_init, metric_init), label="Similarity Heatmap", visible=True)
|
61 |
|
62 |
generate_btn.click(
|
63 |
fn=app_util.validate_inputs,
|
|
|
21 |
with gr.Blocks(title="LLM Similarity Analyzer", css=app_util.custom_css) as demo:
|
22 |
gr.Markdown("# Model Similarity Comparison Tool")
|
23 |
gr.Markdown(links_markdown)
|
24 |
+
gr.Markdown('This is a demo for the recent publication "[Great Models Think Alike and this Undermines AI Oversight](https://huggingface.co/papers/2502.04313)."')
|
25 |
|
26 |
with gr.Row():
|
27 |
dataset_dropdown = gr.Dropdown(
|
|
|
57 |
)
|
58 |
|
59 |
generate_btn = gr.Button("Generate Heatmap", variant="primary")
|
60 |
+
heatmap = gr.Image(value=app_util.create_heatmap(model_init, dataset_init, metric_init), label="Similarity Heatmap", elem_classes="image_container", visible=True)
|
61 |
|
62 |
generate_btn.click(
|
63 |
fn=app_util.validate_inputs,
|
src/app_util.py
CHANGED
@@ -90,9 +90,9 @@ def update_datasets_based_on_models(selected_models, current_dataset):
|
|
90 |
|
91 |
custom_css = """
|
92 |
.image-container img {
|
93 |
-
width:
|
94 |
height: auto !important; /* Maintain aspect ratio */
|
95 |
-
max-width:
|
96 |
display: block;
|
97 |
margin: auto; /* Center the image */
|
98 |
}
|
|
|
90 |
|
91 |
custom_css = """
|
92 |
.image-container img {
|
93 |
+
width: 90% !important; /* Make it 90% of the parent container */
|
94 |
height: auto !important; /* Maintain aspect ratio */
|
95 |
+
max-width: 1000px; /* Optional: Set a max limit */
|
96 |
display: block;
|
97 |
margin: auto; /* Center the image */
|
98 |
}
|