prashant
commited on
Commit
·
3c905d2
1
Parent(s):
2370cfa
coherence to comparison
Browse files- app.py +1 -1
- appStore/coherence.py +7 -8
app.py
CHANGED
@@ -13,6 +13,6 @@ app = MultiApp()
|
|
13 |
app.add_app("About","house", info.app)
|
14 |
app.add_app("SDG Analysis","gear",sdg_analysis.app)
|
15 |
app.add_app("Search","search", keyword_search.app)
|
16 |
-
app.add_app("NDC
|
17 |
|
18 |
app.run()
|
|
|
13 |
app.add_app("About","house", info.app)
|
14 |
app.add_app("SDG Analysis","gear",sdg_analysis.app)
|
15 |
app.add_app("Search","search", keyword_search.app)
|
16 |
+
app.add_app("NDC Comparison","exclude", coherence.app)
|
17 |
|
18 |
app.run()
|
appStore/coherence.py
CHANGED
@@ -47,7 +47,7 @@ def app():
|
|
47 |
#### APP INFO #####
|
48 |
with st.container():
|
49 |
st.markdown("<h1 style='text-align: center; \
|
50 |
-
color: black;'>
|
51 |
unsafe_allow_html=True)
|
52 |
st.write(' ')
|
53 |
st.write(' ')
|
@@ -55,12 +55,11 @@ def app():
|
|
55 |
|
56 |
st.write(
|
57 |
"""
|
58 |
-
The *
|
59 |
coherence between a given policy document and a country’s (Intended)\
|
60 |
Nationally Determined Contribution (INDCs/NDCs) using open-source \
|
61 |
data from the German Institute of Development and Sustainability’s \
|
62 |
-
(IDOS) [NDC Explorer]
|
63 |
-
(https://klimalog.idos-research.de/ndc/#NDCExplorer/worldMap?NewAndUpdatedNDC??income???catIncome).\
|
64 |
""")
|
65 |
st.write("")
|
66 |
st.write(""" User can select a country context via the drop-down menu \
|
@@ -76,8 +75,8 @@ def app():
|
|
76 |
climate change mitigation (e.g., fossil fuel production, REDD+) and \
|
77 |
22 indicators under climate change adaptation (e.g., sea level rise,\
|
78 |
investment needs). The assignment of the paragraph to a corresponding\
|
79 |
-
indicator is based on vector similarities in which
|
80 |
-
|
81 |
|
82 |
with st.sidebar:
|
83 |
|
@@ -90,7 +89,7 @@ def app():
|
|
90 |
st.markdown("---")
|
91 |
|
92 |
with st.container():
|
93 |
-
if st.button("
|
94 |
sent_cca = countrySpecificCCA(cca_sent,1,countryCode)
|
95 |
sent_ccm = countrySpecificCCM(ccm_sent,1,countryCode)
|
96 |
|
@@ -133,7 +132,7 @@ def app():
|
|
133 |
axis = 1)
|
134 |
|
135 |
for i,key in enumerate(list(sent_dict.keys())):
|
136 |
-
st.
|
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))
|
|
|
47 |
#### APP INFO #####
|
48 |
with st.container():
|
49 |
st.markdown("<h1 style='text-align: center; \
|
50 |
+
color: black;'> NDC Comparison</h1>",
|
51 |
unsafe_allow_html=True)
|
52 |
st.write(' ')
|
53 |
st.write(' ')
|
|
|
55 |
|
56 |
st.write(
|
57 |
"""
|
58 |
+
The *NDC Comparison* application provides easy evaluation of
|
59 |
coherence between a given policy document and a country’s (Intended)\
|
60 |
Nationally Determined Contribution (INDCs/NDCs) using open-source \
|
61 |
data from the German Institute of Development and Sustainability’s \
|
62 |
+
(IDOS) [NDC Explorer](https://klimalog.idos-research.de/ndc/#NDCExplorer/worldMap?NewAndUpdatedNDC??income???catIncome).\
|
|
|
63 |
""")
|
64 |
st.write("")
|
65 |
st.write(""" User can select a country context via the drop-down menu \
|
|
|
75 |
climate change mitigation (e.g., fossil fuel production, REDD+) and \
|
76 |
22 indicators under climate change adaptation (e.g., sea level rise,\
|
77 |
investment needs). The assignment of the paragraph to a corresponding\
|
78 |
+
indicator is based on vector similarities in which top 3 results
|
79 |
+
if found are shown to the user. """)
|
80 |
|
81 |
with st.sidebar:
|
82 |
|
|
|
89 |
st.markdown("---")
|
90 |
|
91 |
with st.container():
|
92 |
+
if st.button("Compare with NDC"):
|
93 |
sent_cca = countrySpecificCCA(cca_sent,1,countryCode)
|
94 |
sent_ccm = countrySpecificCCM(ccm_sent,1,countryCode)
|
95 |
|
|
|
132 |
axis = 1)
|
133 |
|
134 |
for i,key in enumerate(list(sent_dict.keys())):
|
135 |
+
st.subheader("Relevant paragraphs for topic: {}".format(key))
|
136 |
df = results_df[results_df['query']==sent_dict[key]].reset_index(drop=True)
|
137 |
for j in range(3):
|
138 |
st.write('Result {}.'.format(j+1))
|