ppsingh commited on
Commit
144d528
1 Parent(s): bc82aca
Files changed (2) hide show
  1. app.py +1 -4
  2. appStore/target.py +15 -2
app.py CHANGED
@@ -20,7 +20,7 @@ with st.sidebar:
20
  add_upload(choice)
21
 
22
  with st.container():
23
- st.markdown("<h2 style='text-align: center; color: black;'> Climate Policy Intelligence App </h2>", unsafe_allow_html=True)
24
  st.write(' ')
25
 
26
  with st.expander("ℹ️ - About this app", expanded=False):
@@ -41,9 +41,6 @@ with st.expander("ℹ️ - About this app", expanded=False):
41
  - Step 3: The paragraphs which are detected containing some target \
42
  related information are then fed to multiple classifier to enrich the
43
  Information Extraction.
44
-
45
- Classifiers
46
- - Netzero:
47
 
48
  """)
49
  st.write("")
 
20
  add_upload(choice)
21
 
22
  with st.container():
23
+ st.markdown("<h2 style='text-align: center; color: black;'> Climate Policy Understanding App </h2>", unsafe_allow_html=True)
24
  st.write(' ')
25
 
26
  with st.expander("ℹ️ - About this app", expanded=False):
 
41
  - Step 3: The paragraphs which are detected containing some target \
42
  related information are then fed to multiple classifier to enrich the
43
  Information Extraction.
 
 
 
44
 
45
  """)
46
  st.write("")
appStore/target.py CHANGED
@@ -115,13 +115,26 @@ def target_display():
115
  st.write('**Economy-wide Related Paragraphs**: `{}`'.format(count_economy))
116
 
117
  hits = hits.sort_values(by=['Relevancy'], ascending=False)
118
- st.write("")
 
 
 
 
 
 
 
 
 
 
119
  st.markdown("###### Top few Target Classified paragraph/text results ######")
120
  range_val = min(5,len(hits))
121
  for i in range(range_val):
122
  # the page number reflects the page that contains the main paragraph
123
  # according to split limit, the overlapping part can be on a separate page
124
- st.write('**Result {}** `page {}` (Relevancy Score: {:.2f})'.format(i+1,hits.iloc[i]['page'],hits.iloc[i]['Relevancy']))
 
 
 
125
  st.write("\t Text: \t{}".format(hits.iloc[i]['text'].replace("\n", " ")))
126
  else:
127
  st.info("🤔 No Targets found")
 
115
  st.write('**Economy-wide Related Paragraphs**: `{}`'.format(count_economy))
116
 
117
  hits = hits.sort_values(by=['Relevancy'], ascending=False)
118
+ netzerohit = hits[hits['Netzero Label' == 'NETZERO']]
119
+ if not netzerohit.empty():
120
+ netzero = netzero.sort_values(by = ['Netzero Score'], ascending = False)
121
+ st.markdown("###### Netzero paragraph ######")
122
+ st.write('** Text `page {}`: {}'.format(netzerohit.iloc[i]['page'],
123
+ netzerohit.iloc[i]['text'].replace("\n", " ")))
124
+ st.write("")
125
+ else:
126
+ st.info("🤔 No Netzero paragraph found")
127
+
128
+ # st.write("**Result {}** `page {}` (Relevancy Score: {:.2f})'".format(i+1,hits.iloc[i]['page'],hits.iloc[i]['Relevancy'])")
129
  st.markdown("###### Top few Target Classified paragraph/text results ######")
130
  range_val = min(5,len(hits))
131
  for i in range(range_val):
132
  # the page number reflects the page that contains the main paragraph
133
  # according to split limit, the overlapping part can be on a separate page
134
+ st.write('**Result {}** (Relevancy Score: {:.2f}): `page {}`, `Sector: {}`'\
135
+ .format(i+1,hits.iloc[i]['Relevancy'],
136
+ hits.iloc[i]['page'], hits.iloc[i]['Sector Label'],
137
+ ))
138
  st.write("\t Text: \t{}".format(hits.iloc[i]['text'].replace("\n", " ")))
139
  else:
140
  st.info("🤔 No Targets found")