prashant
commited on
Commit
•
d5e598b
1
Parent(s):
98418a5
AGrid trial
Browse files- appStore/sdg_analysis.py +3 -3
- utils/keyword_extraction.py +2 -2
appStore/sdg_analysis.py
CHANGED
@@ -146,9 +146,9 @@ def app():
|
|
146 |
st.table(tRkeywordsDf)
|
147 |
|
148 |
st.markdown("##### Top few SDG Classified paragraph/text results #####")
|
149 |
-
c7, c8, c9 = st.columns([1, 10, 1])
|
150 |
-
with c8:
|
151 |
-
|
152 |
else:
|
153 |
st.info("🤔 No document found, please try to upload it at the sidebar!")
|
154 |
logging.warning("Terminated as no document provided")
|
|
|
146 |
st.table(tRkeywordsDf)
|
147 |
|
148 |
st.markdown("##### Top few SDG Classified paragraph/text results #####")
|
149 |
+
# c7, c8, c9 = st.columns([1, 10, 1])
|
150 |
+
# with c8:
|
151 |
+
AgGrid(df)
|
152 |
else:
|
153 |
st.info("🤔 No document found, please try to upload it at the sidebar!")
|
154 |
logging.warning("Terminated as no document provided")
|
utils/keyword_extraction.py
CHANGED
@@ -67,8 +67,8 @@ def keywordExtraction(sdg:int,sdgdata:List[Text]):
|
|
67 |
def textrank(textdata, ratio = 0.1, words = 0):
|
68 |
if words == 0:
|
69 |
try:
|
70 |
-
words = config.get('sdg','TOP_KEY')
|
71 |
-
results = keywords.keywords(textdata, words =
|
72 |
except:
|
73 |
logging.warning("paramconfig not found, running textrank with ratio")
|
74 |
results = keywords.keywords(textdata, ratio= ratio).split("\n")
|
|
|
67 |
def textrank(textdata, ratio = 0.1, words = 0):
|
68 |
if words == 0:
|
69 |
try:
|
70 |
+
words = int(config.get('sdg','TOP_KEY'))
|
71 |
+
results = keywords.keywords(textdata, words = words).split("\n")
|
72 |
except:
|
73 |
logging.warning("paramconfig not found, running textrank with ratio")
|
74 |
results = keywords.keywords(textdata, ratio= ratio).split("\n")
|