Spaces:
Paused
Paused
derek-thomas
commited on
Commit
Β·
176bc83
1
Parent(s):
356174d
Updating topic_word in AgGrid
Browse files
app/pages/02_Document_Explorer_π.py
CHANGED
|
@@ -90,7 +90,7 @@ def main():
|
|
| 90 |
builder = GridOptionsBuilder.from_dataframe(data[ordered_cols])
|
| 91 |
builder.configure_pagination()
|
| 92 |
go = builder.build()
|
| 93 |
-
AgGrid(
|
| 94 |
columns_auto_size_mode=ColumnsAutoSizeMode.FIT_CONTENTS)
|
| 95 |
else:
|
| 96 |
st.markdown('Select points in the graph with the `lasso` or `box` select tools to populate this table.')
|
|
|
|
| 90 |
builder = GridOptionsBuilder.from_dataframe(data[ordered_cols])
|
| 91 |
builder.configure_pagination()
|
| 92 |
go = builder.build()
|
| 93 |
+
AgGrid(data[ordered_cols], theme='streamlit', gridOptions=go,
|
| 94 |
columns_auto_size_mode=ColumnsAutoSizeMode.FIT_CONTENTS)
|
| 95 |
else:
|
| 96 |
st.markdown('Select points in the graph with the `lasso` or `box` select tools to populate this table.')
|
app/pages/03_Semantic_Search_π.py
CHANGED
|
@@ -91,12 +91,13 @@ def main():
|
|
| 91 |
cols = ['id', 'document_scores', 'topic_id', 'documents']
|
| 92 |
data = st.session_state.data_to_model_without_point.loc[:, cols]
|
| 93 |
data['topic_word'] = data.topic_id.replace(st.session_state.topic_str_to_word)
|
| 94 |
-
|
|
|
|
| 95 |
builder.configure_pagination()
|
| 96 |
builder.configure_column('document_scores', type=["numericColumn", "numberColumnFilter", "customNumericFormat"],
|
| 97 |
precision=2)
|
| 98 |
go = builder.build()
|
| 99 |
-
AgGrid(
|
| 100 |
columns_auto_size_mode=ColumnsAutoSizeMode.FIT_CONTENTS)
|
| 101 |
|
| 102 |
with tab2:
|
|
|
|
| 91 |
cols = ['id', 'document_scores', 'topic_id', 'documents']
|
| 92 |
data = st.session_state.data_to_model_without_point.loc[:, cols]
|
| 93 |
data['topic_word'] = data.topic_id.replace(st.session_state.topic_str_to_word)
|
| 94 |
+
ordered_cols = ['id', 'document_scores', 'topic_id', 'topic_word', 'documents']
|
| 95 |
+
builder = GridOptionsBuilder.from_dataframe(data[ordered_cols])
|
| 96 |
builder.configure_pagination()
|
| 97 |
builder.configure_column('document_scores', type=["numericColumn", "numberColumnFilter", "customNumericFormat"],
|
| 98 |
precision=2)
|
| 99 |
go = builder.build()
|
| 100 |
+
AgGrid(data[ordered_cols], theme='streamlit', gridOptions=go,
|
| 101 |
columns_auto_size_mode=ColumnsAutoSizeMode.FIT_CONTENTS)
|
| 102 |
|
| 103 |
with tab2:
|