UlrickBL commited on
Commit
3b279ba
·
verified ·
1 Parent(s): f200cca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -8
app.py CHANGED
@@ -15,16 +15,23 @@ df = pd.read_csv("benchmark_overview_data.csv")
15
  # Display DataFrame in a nicely formatted table using AgGrid
16
  st.write("### Benchmark Details Table")
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  # Configure AgGrid options
19
- builder = GridOptionsBuilder.from_dataframe(df)
20
  builder.configure_default_column(resizable=True, wrapText=True, autoHeight=False) # Disable autoHeight
21
  builder.configure_grid_options(domLayout='normal', rowHeight=40) # Set fixed row height
22
  options = builder.build()
23
 
24
- AgGrid(df, gridOptions=options, height=400, fit_columns_on_grid_load=True, theme="streamlit")
25
-
26
- # Optionally add additional details or filters
27
- st.write("### Explore Benchmarks")
28
- selected_task = st.selectbox("Select an Evaluated Task", options=df["Evaluated task"].unique())
29
- filtered_data = df[df["Evaluated task"] == selected_task]
30
- st.write(filtered_data)
 
15
  # Display DataFrame in a nicely formatted table using AgGrid
16
  st.write("### Benchmark Details Table")
17
 
18
+ # Display DataFrame in a nicely formatted table using AgGrid
19
+ st.write("### Benchmark Details Table")
20
+
21
+ # Add a selectbox for filtering by evaluated task or showing all
22
+ task_options = ["All"] + list(df["Evaluated task"].unique())
23
+ selected_task = st.selectbox("Select an Evaluated Task", options=task_options)
24
+
25
+ # Filter data if a specific task is selected
26
+ if selected_task != "All":
27
+ filtered_data = df[df["Evaluated task"] == selected_task]
28
+ else:
29
+ filtered_data = df
30
+
31
  # Configure AgGrid options
32
+ builder = GridOptionsBuilder.from_dataframe(filtered_data)
33
  builder.configure_default_column(resizable=True, wrapText=True, autoHeight=False) # Disable autoHeight
34
  builder.configure_grid_options(domLayout='normal', rowHeight=40) # Set fixed row height
35
  options = builder.build()
36
 
37
+ AgGrid(filtered_data, gridOptions=options, height=600, fit_columns_on_grid_load=True, theme="streamlit") # Display filtered or full data