Spaces:
Sleeping
Sleeping
Sebastian Deatc
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -201,30 +201,23 @@
|
|
201 |
|
202 |
import gradio as gr
|
203 |
import pandas as pd
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
try:
|
217 |
-
df = pd.read_pickle(f"./results/tagged/{dataset}_{model_name}_{i}.pkl")[["Category", "Sub-Category", "model", "round", "tag"]]
|
218 |
-
data.append(df)
|
219 |
-
except Exception as e:
|
220 |
-
print(f"skipping {dataset}_{model_name}_{i}")
|
221 |
-
|
222 |
-
raw_data = pd.concat(data)
|
223 |
|
224 |
# Gradio Interface
|
225 |
with gr.Blocks() as demo:
|
226 |
-
gr.Markdown("#
|
227 |
-
gr.DataFrame(value=
|
228 |
|
229 |
# Launch the Gradio app
|
230 |
demo.launch()
|
|
|
201 |
|
202 |
import gradio as gr
|
203 |
import pandas as pd
|
204 |
+
|
205 |
+
# Sample DataFrame
|
206 |
+
data = {
|
207 |
+
'Model': ['Model A', 'Model B', 'Model C'],
|
208 |
+
'Accuracy': [0.95, 0.90, 0.85],
|
209 |
+
'F1 Score': [0.96, 0.89, 0.84]
|
210 |
+
}
|
211 |
+
df = pd.DataFrame(data)
|
212 |
+
|
213 |
+
# Function to display the DataFrame
|
214 |
+
def display_table():
|
215 |
+
return df
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
|
217 |
# Gradio Interface
|
218 |
with gr.Blocks() as demo:
|
219 |
+
gr.Markdown("# Benchmark Results")
|
220 |
+
gr.DataFrame(value=df, label="Benchmark Table", interactive=False) # Display the DataFrame
|
221 |
|
222 |
# Launch the Gradio app
|
223 |
demo.launch()
|