add target display
Browse files- app.py +2 -2
- appStore/target.py +2 -2
app.py
CHANGED
@@ -81,8 +81,8 @@ if 'key1' in st.session_state:
|
|
81 |
('Target', 'Action', 'Policies/Plans'))
|
82 |
|
83 |
if topic == 'Target':
|
84 |
-
st.dataframe(st.session_state['key1'])
|
85 |
-
|
86 |
elif topic == 'Action':
|
87 |
policyaction.action_display()
|
88 |
else:
|
|
|
81 |
('Target', 'Action', 'Policies/Plans'))
|
82 |
|
83 |
if topic == 'Target':
|
84 |
+
# st.dataframe(st.session_state['key1'])
|
85 |
+
target_extraction.target_display()
|
86 |
elif topic == 'Action':
|
87 |
policyaction.action_display()
|
88 |
else:
|
appStore/target.py
CHANGED
@@ -97,7 +97,7 @@ def target_display():
|
|
97 |
count_target = sum(hits['Target Label'] == 'TARGET')
|
98 |
count_netzero = sum(hits['Netzero Label'] == 'NETZERO')
|
99 |
count_ghg = sum(hits['GHG Label'] == 'GHG')
|
100 |
-
|
101 |
for x in hits['Sector Label']])
|
102 |
|
103 |
c1, c2 = st.columns([1,1])
|
@@ -106,7 +106,7 @@ def target_display():
|
|
106 |
st.write('**NetZero Related Paragraphs**: `{}`'.format(count_netzero))
|
107 |
with c2:
|
108 |
st.write('**GHG Target Related Paragraphs**: `{}`'.format(count_ghg))
|
109 |
-
st.write('**Economy-wide Related Paragraphs**: `{}`'.format(
|
110 |
# st.write('-------------------')
|
111 |
hits = hits.sort_values(by=['Target Score'], ascending=False)
|
112 |
hits = hits.reset_index(drop=True)
|
|
|
97 |
count_target = sum(hits['Target Label'] == 'TARGET')
|
98 |
count_netzero = sum(hits['Netzero Label'] == 'NETZERO')
|
99 |
count_ghg = sum(hits['GHG Label'] == 'GHG')
|
100 |
+
count_transport = sum([True if 'Transport' in x else False
|
101 |
for x in hits['Sector Label']])
|
102 |
|
103 |
c1, c2 = st.columns([1,1])
|
|
|
106 |
st.write('**NetZero Related Paragraphs**: `{}`'.format(count_netzero))
|
107 |
with c2:
|
108 |
st.write('**GHG Target Related Paragraphs**: `{}`'.format(count_ghg))
|
109 |
+
st.write('**Economy-wide Related Paragraphs**: `{}`'.format(count_transport))
|
110 |
# st.write('-------------------')
|
111 |
hits = hits.sort_values(by=['Target Score'], ascending=False)
|
112 |
hits = hits.reset_index(drop=True)
|