prashant
commited on
Commit
•
590f5f3
1
Parent(s):
11e64f9
adjusting column width aggrid
Browse files- appStore/sdg_analysis.py +7 -3
appStore/sdg_analysis.py
CHANGED
@@ -13,6 +13,7 @@ from docx.shared import Inches
|
|
13 |
from docx.shared import Pt
|
14 |
from docx.enum.style import WD_STYLE_TYPE
|
15 |
from st_aggrid import AgGrid
|
|
|
16 |
from utils.sdg_classifier import sdg_classification
|
17 |
from utils.sdg_classifier import runSDGPreprocessingPipeline
|
18 |
from utils.keyword_extraction import keywordExtraction, textrank
|
@@ -134,7 +135,7 @@ def app():
|
|
134 |
|
135 |
st.markdown("#### Anything related to SDGs? ####")
|
136 |
|
137 |
-
c4, c5, c6 = st.columns([
|
138 |
|
139 |
with c5:
|
140 |
st.pyplot(fig)
|
@@ -144,12 +145,15 @@ def app():
|
|
144 |
# c1, c2, c3 = st.columns([1, 10, 1])
|
145 |
# with c2:
|
146 |
# st.table(tRkeywordsDf)
|
147 |
-
AgGrid(tRkeywordsDf, reload_data = False,
|
|
|
|
|
148 |
|
149 |
st.markdown("###### Top few SDG Classified paragraph/text results ######")
|
150 |
# c7, c8, c9 = st.columns([1, 10, 1])
|
151 |
# with c8:
|
152 |
-
AgGrid(df, reload_data = False, update_mode="value_changed"
|
|
|
153 |
else:
|
154 |
st.info("🤔 No document found, please try to upload it at the sidebar!")
|
155 |
logging.warning("Terminated as no document provided")
|
|
|
13 |
from docx.shared import Pt
|
14 |
from docx.enum.style import WD_STYLE_TYPE
|
15 |
from st_aggrid import AgGrid
|
16 |
+
from st_aggrid.shared import ColumnsAutoSizeMode
|
17 |
from utils.sdg_classifier import sdg_classification
|
18 |
from utils.sdg_classifier import runSDGPreprocessingPipeline
|
19 |
from utils.keyword_extraction import keywordExtraction, textrank
|
|
|
135 |
|
136 |
st.markdown("#### Anything related to SDGs? ####")
|
137 |
|
138 |
+
c4, c5, c6 = st.columns([1, 3, 1])
|
139 |
|
140 |
with c5:
|
141 |
st.pyplot(fig)
|
|
|
145 |
# c1, c2, c3 = st.columns([1, 10, 1])
|
146 |
# with c2:
|
147 |
# st.table(tRkeywordsDf)
|
148 |
+
AgGrid(tRkeywordsDf, reload_data = False,
|
149 |
+
update_mode="value_changed",
|
150 |
+
columns_auto_size_mode = ColumnsAutoSizeMode.FIT_ALL_COLUMNS_TO_VIEW )
|
151 |
|
152 |
st.markdown("###### Top few SDG Classified paragraph/text results ######")
|
153 |
# c7, c8, c9 = st.columns([1, 10, 1])
|
154 |
# with c8:
|
155 |
+
AgGrid(df, reload_data = False, update_mode="value_changed",
|
156 |
+
columns_auto_size_mode = ColumnsAutoSizeMode.FIT_ALL_COLUMNS_TO_VIEW)
|
157 |
else:
|
158 |
st.info("🤔 No document found, please try to upload it at the sidebar!")
|
159 |
logging.warning("Terminated as no document provided")
|