UlrickBL commited on
Commit
04f0854
·
verified ·
1 Parent(s): f6a6fe3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -1,6 +1,9 @@
1
  import streamlit as st
2
  import pandas as pd
3
  from huggingface_hub import Repository
 
 
 
4
 
5
  # Title and description
6
  st.title("Benchmark Overview")
@@ -9,9 +12,16 @@ st.write("This application displays an overview of various benchmarks, their det
9
  # Simulated CSV data (replace this with actual CSV reading if available)
10
  df = pd.read_csv("benchmark_overview_data.csv")
11
 
12
- # Display DataFrame in a nice format
13
  st.write("### Benchmark Details Table")
14
- st.dataframe(df, use_container_width=True)
 
 
 
 
 
 
 
15
 
16
  # Optionally add additional details or filters
17
  st.write("### Explore Benchmarks")
 
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")
 
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
+ # Configure AgGrid options
19
+ builder = GridOptionsBuilder.from_dataframe(df)
20
+ builder.configure_default_column(resizable=True, wrapText=True, autoHeight=True)
21
+ builder.configure_grid_options(domLayout='autoHeight', rowHeight=50)
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")