Spaces:
Running
Running
Delete old_app.py
Browse files- old_app.py +0 -42
old_app.py
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
import pandas as pd
|
3 |
-
from huggingface_hub import Repository
|
4 |
-
from st_aggrid import AgGrid, GridOptionsBuilder
|
5 |
-
|
6 |
-
st.set_page_config(layout="wide")
|
7 |
-
|
8 |
-
# Title and description
|
9 |
-
st.title("Benchmark Overview")
|
10 |
-
st.write("This application displays an overview of various benchmarks, their details, and related information in a clean and readable format.")
|
11 |
-
|
12 |
-
# Simulated CSV data (replace this with actual CSV reading if available)
|
13 |
-
df = pd.read_csv("benchmark_overview_data.csv")
|
14 |
-
|
15 |
-
# Display DataFrame in a nicely formatted table using AgGrid
|
16 |
-
st.write("### Benchmark Details Table")
|
17 |
-
|
18 |
-
# Add a selectbox for filtering by evaluated task or showing all
|
19 |
-
task_options = ["All"] + list(df["Evaluated task"].unique())
|
20 |
-
selected_task = st.selectbox("Select an Evaluated Task", options=task_options)
|
21 |
-
|
22 |
-
# Filter data if a specific task is selected
|
23 |
-
if selected_task != "All":
|
24 |
-
filtered_data = df[df["Evaluated task"] == selected_task]
|
25 |
-
else:
|
26 |
-
filtered_data = df
|
27 |
-
|
28 |
-
# Configure AgGrid options
|
29 |
-
builder = GridOptionsBuilder.from_dataframe(filtered_data)
|
30 |
-
builder.configure_default_column(resizable=True, wrapText=True, autoHeight=False) # Disable autoHeight
|
31 |
-
builder.configure_grid_options(domLayout='normal', rowHeight=40) # Set fixed row height
|
32 |
-
|
33 |
-
# Make the Benchmark column bold
|
34 |
-
builder.configure_columns(["Benchmark"], cellStyle={"fontWeight": "bold"})
|
35 |
-
|
36 |
-
# Enable tooltips for viewing full cell content
|
37 |
-
builder.configure_columns(filtered_data.columns.tolist(), tooltipField="value")
|
38 |
-
options = builder.build()
|
39 |
-
|
40 |
-
AgGrid(filtered_data, gridOptions=options, height=600, fit_columns_on_grid_load=True, theme="streamlit", allow_unsafe_jscode=True) # Display filtered or full data
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|