Spaces:
Runtime error
Runtime error
Tristan Thrush
commited on
Commit
•
556b288
1
Parent(s):
fb1fa43
made table sizing a little smarter
Browse files
app.py
CHANGED
@@ -8,6 +8,8 @@ from st_aggrid import AgGrid, GridOptionsBuilder, JsCode
|
|
8 |
from os.path import exists
|
9 |
import threading
|
10 |
|
|
|
|
|
11 |
|
12 |
def get_model_infos():
|
13 |
api = HfApi()
|
@@ -206,7 +208,8 @@ if len(dataset_df) > 0:
|
|
206 |
)
|
207 |
|
208 |
go = gb.build()
|
209 |
-
|
|
|
210 |
|
211 |
else:
|
212 |
st.markdown(
|
|
|
8 |
from os.path import exists
|
9 |
import threading
|
10 |
|
11 |
+
st.set_page_config(layout="wide")
|
12 |
+
|
13 |
|
14 |
def get_model_infos():
|
15 |
api = HfApi()
|
|
|
208 |
)
|
209 |
|
210 |
go = gb.build()
|
211 |
+
fit_columns = len(dataset_df.columns) < 10
|
212 |
+
AgGrid(dataset_df, gridOptions=go, height=28*len(dataset_df) + (35 if fit_columns else 41), allow_unsafe_jscode=True, fit_columns_on_grid_load=fit_columns)
|
213 |
|
214 |
else:
|
215 |
st.markdown(
|