v1.2
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
import pandas as pd
|
3 |
import numpy as np
|
4 |
|
5 |
-
# Data for Table 1: Robustness Results (unchanged
|
6 |
robustness_data = {
|
7 |
"Model Name": [
|
8 |
"Gemini 2.0 Flash Exp", "Gemini 1.5 Pro 002", "OpenAI GPT-4o", "OpenAI o1", "OpenAI o3-mini",
|
@@ -21,7 +21,7 @@ robustness_data = {
|
|
21 |
"Robustness (Ξ)": ["0.83 (β0.12)", "0.84 (β0.12)", "0.85 (β0.10)", "0.81 (β0.16)", "0.90 (β0.08)", "0.64 (β0.19)", "0.82 (β0.13)", "0.86 (β0.09)", "0.89 (β0.07)", "0.80 (β0.14)", "0.70 (β0.21)", "0.80 (β0.14)", "0.82 (β0.13)", "0.75 (β0.17)", "0.86 (β0.09)", "0.85 (β0.10)", "0.84 (β0.10)", "0.74 (β0.17)", "0.80 (β0.15)", "0.82 (β0.12)", "0.58 (β0.28)", "0.70 (β0.18)", "0.63 (β0.26)", "0.83 (β0.13)"]
|
22 |
}
|
23 |
|
24 |
-
# Data for Table 2: Context Grounding Results (unchanged
|
25 |
context_grounding_data = {
|
26 |
"Model Name": [
|
27 |
"Gemini 2.0 Flash Exp", "Gemini 1.5 Pro 002", "OpenAI GPT-4o", "OpenAI o1", "OpenAI o3-mini",
|
@@ -82,7 +82,6 @@ def create_leaderboard():
|
|
82 |
value=robustness_df,
|
83 |
label="Robustness Results",
|
84 |
wrap=True,
|
85 |
-
height=600, # Increase table height for longer appearance
|
86 |
elem_classes=["custom-table"] # Custom CSS class for styling
|
87 |
)
|
88 |
with gr.Column():
|
@@ -91,15 +90,16 @@ def create_leaderboard():
|
|
91 |
value=context_grounding_df,
|
92 |
label="Context Grounding Results",
|
93 |
wrap=True,
|
94 |
-
height=600, # Increase table height for longer appearance
|
95 |
elem_classes=["custom-table"] # Custom CSS class for styling
|
96 |
)
|
97 |
|
98 |
-
# Custom CSS for better table appearance (larger font, spacing)
|
99 |
demo.css = """
|
100 |
.custom-table {
|
101 |
font-size: 16px; /* Increase font size for readability */
|
102 |
line-height: 2; /* Increase line height for longer rows */
|
|
|
|
|
103 |
border-collapse: collapse;
|
104 |
}
|
105 |
.custom-table th, .custom-table td {
|
|
|
2 |
import pandas as pd
|
3 |
import numpy as np
|
4 |
|
5 |
+
# Data for Table 1: Robustness Results (unchanged)
|
6 |
robustness_data = {
|
7 |
"Model Name": [
|
8 |
"Gemini 2.0 Flash Exp", "Gemini 1.5 Pro 002", "OpenAI GPT-4o", "OpenAI o1", "OpenAI o3-mini",
|
|
|
21 |
"Robustness (Ξ)": ["0.83 (β0.12)", "0.84 (β0.12)", "0.85 (β0.10)", "0.81 (β0.16)", "0.90 (β0.08)", "0.64 (β0.19)", "0.82 (β0.13)", "0.86 (β0.09)", "0.89 (β0.07)", "0.80 (β0.14)", "0.70 (β0.21)", "0.80 (β0.14)", "0.82 (β0.13)", "0.75 (β0.17)", "0.86 (β0.09)", "0.85 (β0.10)", "0.84 (β0.10)", "0.74 (β0.17)", "0.80 (β0.15)", "0.82 (β0.12)", "0.58 (β0.28)", "0.70 (β0.18)", "0.63 (β0.26)", "0.83 (β0.13)"]
|
22 |
}
|
23 |
|
24 |
+
# Data for Table 2: Context Grounding Results (unchanged)
|
25 |
context_grounding_data = {
|
26 |
"Model Name": [
|
27 |
"Gemini 2.0 Flash Exp", "Gemini 1.5 Pro 002", "OpenAI GPT-4o", "OpenAI o1", "OpenAI o3-mini",
|
|
|
82 |
value=robustness_df,
|
83 |
label="Robustness Results",
|
84 |
wrap=True,
|
|
|
85 |
elem_classes=["custom-table"] # Custom CSS class for styling
|
86 |
)
|
87 |
with gr.Column():
|
|
|
90 |
value=context_grounding_df,
|
91 |
label="Context Grounding Results",
|
92 |
wrap=True,
|
|
|
93 |
elem_classes=["custom-table"] # Custom CSS class for styling
|
94 |
)
|
95 |
|
96 |
+
# Custom CSS for better table appearance (larger font, spacing, and height)
|
97 |
demo.css = """
|
98 |
.custom-table {
|
99 |
font-size: 16px; /* Increase font size for readability */
|
100 |
line-height: 2; /* Increase line height for longer rows */
|
101 |
+
max-height: 600px; /* Set maximum height for scrolling if needed */
|
102 |
+
overflow-y: auto; /* Enable vertical scrolling if content exceeds height */
|
103 |
border-collapse: collapse;
|
104 |
}
|
105 |
.custom-table th, .custom-table td {
|