prashant
commited on
Commit
•
183851c
1
Parent(s):
49548a6
changing display of coherence results
Browse files- appStore/coherence.py +9 -4
- appStore/sdg_analysis.py +1 -1
appStore/coherence.py
CHANGED
@@ -128,11 +128,16 @@ def app():
|
|
128 |
max_seq_len=max_seq_len, useQueryCheck=False)
|
129 |
raw_output = runSemanticPipeline(pipeline=semanticsearch_pipeline,queries=sent_labels)
|
130 |
results_df = process_semantic_output(raw_output)
|
131 |
-
|
132 |
-
'context_offset','context','
|
133 |
axis = 1)
|
134 |
-
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
else:
|
138 |
st.info("🤔 No document found, please try to upload it at the sidebar!")
|
|
|
128 |
max_seq_len=max_seq_len, useQueryCheck=False)
|
129 |
raw_output = runSemanticPipeline(pipeline=semanticsearch_pipeline,queries=sent_labels)
|
130 |
results_df = process_semantic_output(raw_output)
|
131 |
+
results_df = results_df.drop(['answer','answer_offset',
|
132 |
+
'context_offset','context','reader_score','id'],
|
133 |
axis = 1)
|
134 |
+
|
135 |
+
for i,key in enumerate(list(sent_dict.keys())):
|
136 |
+
st.write("Relevant paragraphs for topic:{}".format(key))
|
137 |
+
df = results_df[results_df['query']==sent_dict[key]].reset_index(drop=True)
|
138 |
+
for j in range(3):
|
139 |
+
st.write('Result {}.'.format(j+1))
|
140 |
+
st.write(df.loc[j]['content']+'\n')
|
141 |
|
142 |
else:
|
143 |
st.info("🤔 No document found, please try to upload it at the sidebar!")
|
appStore/sdg_analysis.py
CHANGED
@@ -34,7 +34,7 @@ def app():
|
|
34 |
|
35 |
#### APP INFO #####
|
36 |
with st.container():
|
37 |
-
st.markdown("<
|
38 |
st.write(' ')
|
39 |
st.write(' ')
|
40 |
|
|
|
34 |
|
35 |
#### APP INFO #####
|
36 |
with st.container():
|
37 |
+
st.markdown("<h1 style='text-align: center; color: black;'> SDG Classification and Keyphrase Extraction </h1>", unsafe_allow_html=True)
|
38 |
st.write(' ')
|
39 |
st.write(' ')
|
40 |
|