Spaces:
GIZ
/
Running on CPU Upgrade

prashant commited on
Commit
183851c
1 Parent(s): 49548a6

changing display of coherence results

Browse files
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
- data = results_df.drop(['answer','answer_offset',
132
- 'context_offset','context','retriever_score'],
133
  axis = 1)
134
- AgGrid(data, reload_data = False, update_mode="value_changed",
135
- columns_auto_size_mode = ColumnsAutoSizeMode.FIT_CONTENTS)
 
 
 
 
 
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("<h2 style='text-align: center; color: black;'> SDG Classification and Keyphrase Extraction </h2>", unsafe_allow_html=True)
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