prashant
commited on
Commit
•
482fd47
1
Parent(s):
5e6f5c6
updating image and menu
Browse files- appStore/info.py +39 -10
- appStore/multiapp.py +7 -13
appStore/info.py
CHANGED
@@ -1,13 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
|
4 |
def app():
|
5 |
-
# if 'file' in st.session_state:
|
6 |
-
# file = st.session_state['file']
|
7 |
-
# else:
|
8 |
-
# st.sidebar.markdown(" :cloud: Upload document ")
|
9 |
-
# uploaded_file = st.sidebar.file_uploader('', type=['pdf', 'docx', 'txt']) #Upload PDF File
|
10 |
-
# st.session_state['file'] = uploaded_file
|
11 |
|
12 |
with open('style.css') as f:
|
13 |
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
|
@@ -26,11 +19,47 @@ def app():
|
|
26 |
st.subheader("Policy Action Tracker Manual")
|
27 |
intro = """
|
28 |
<div class="text">
|
29 |
-
The manual extraction of relevant information from text documents is a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
For this purpose, the United Nations Sustainable Development Solutions
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
-
The collaboration aims to determine the potential of NLP methods for
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
<ul>
|
35 |
<li>Analizing the policy document</li>
|
36 |
<li>finding SDG related content</li>
|
|
|
1 |
import streamlit as st
|
2 |
|
|
|
3 |
def app():
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
with open('style.css') as f:
|
6 |
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
|
|
|
19 |
st.subheader("Policy Action Tracker Manual")
|
20 |
intro = """
|
21 |
<div class="text">
|
22 |
+
The manual extraction of relevant information from text documents is a \
|
23 |
+
time-consuming task for any policy analysts. As the amount and length of \
|
24 |
+
public policy documents in relation to sustainable development (such as \
|
25 |
+
National Development Plans and Nationally Determined Contributions) \
|
26 |
+
continuously increases, a major challenge for policy action tracking – the \
|
27 |
+
evaluation of stated goals and targets and their actual implementation on \
|
28 |
+
the ground – arises. Luckily, Artificial Intelligence (AI) and Natural \
|
29 |
+
Language Processing (NLP) methods can help in shortening and easing this \
|
30 |
+
task for policy analysts.
|
31 |
|
32 |
+
For this purpose, the United Nations Sustainable Development Solutions \
|
33 |
+
Network (SDSN) and the Deutsche Gesellschaft für Internationale \
|
34 |
+
Zusammenarbeit (GIZ) GmbH are collaborating since 2021 in the development \
|
35 |
+
of an AI-powered open-source web application that helps find and extract \
|
36 |
+
relevant information from public policy documents faster to facilitate \
|
37 |
+
evidence-based decision-making processes in sustainable development and beyond.
|
38 |
|
39 |
+
The collaboration aims to determine the potential of NLP methods for \
|
40 |
+
tracking policy implementation and coherence in the context of the \
|
41 |
+
Sustainable Development Goals (SDGs) and the Paris Climate Agreement. \
|
42 |
+
Nationally determined contributions (NDCs) will serve as a starting \
|
43 |
+
point for the analysis and evaluation in a specific national context. \
|
44 |
+
Under the Paris Climate Agreement, NDCs embody the efforts of each \
|
45 |
+
country to reduce national emissions and thus contribute to the \
|
46 |
+
achievement of the long-term goals of the Agreement – to increase the \
|
47 |
+
ability to adapt to adverse impacts of climate change and foster \
|
48 |
+
climate resilience and low greenhouse gas emissions development, in a \
|
49 |
+
manner that does not threaten food production. The Paris Climate \
|
50 |
+
Agreement (Article 4, Paragraph 2)1 requires each Party to prepare, \
|
51 |
+
communicate and maintain successive NDCs. Thus, they serve as a \
|
52 |
+
comparable, accessible, and widely acknowledged starting point for \
|
53 |
+
analysis. However, the agreed and communicated goals and measures must \
|
54 |
+
also be reflected in national strategies, statements, and other \
|
55 |
+
government publications to be implemented timely, as well as effectively.\
|
56 |
+
At best, the activities and measures should have an allocated budget. \
|
57 |
+
Given the complexity, the manual evaluation of policy documents and \
|
58 |
+
other publications has been very time-consuming and has presented a \
|
59 |
+
significant challenge for policy analysts and makers alike. In \
|
60 |
+
consequence, the open-source web application aims to support the process\
|
61 |
+
through suitable AI-powered and NLP methods. In the following, the \
|
62 |
+
application’s functionalities are explained in more detail.
|
63 |
<ul>
|
64 |
<li>Analizing the policy document</li>
|
65 |
<li>finding SDG related content</li>
|
appStore/multiapp.py
CHANGED
@@ -45,17 +45,14 @@ class MultiApp:
|
|
45 |
def run(self):
|
46 |
|
47 |
st.sidebar.write(format_func=lambda app: app['title'])
|
48 |
-
image = Image.open('docStore/img/
|
49 |
-
st.sidebar.image(image)
|
50 |
-
|
51 |
-
#app = st.sidebar.radio(
|
52 |
-
# 'Pages',
|
53 |
-
# self.apps,
|
54 |
-
# from streamlit_option_menu import option_menu
|
55 |
with st.sidebar:
|
56 |
selected = option_menu(None, [page["title"] for page in self.apps],
|
57 |
icons=[page["icon"] for page in self.apps],
|
58 |
-
menu_icon="cast", default_index=0)
|
|
|
59 |
|
60 |
|
61 |
for index, item in enumerate(self.apps):
|
@@ -63,14 +60,11 @@ class MultiApp:
|
|
63 |
self.apps[index]["function"]()
|
64 |
break
|
65 |
|
66 |
-
|
67 |
choice = st.sidebar.radio(label = 'Select the Document',
|
68 |
help = 'You can upload the document \
|
69 |
or else you can try a example document',
|
70 |
options = ('Upload Document', 'Try Example'),
|
71 |
horizontal = True)
|
72 |
add_upload(choice)
|
73 |
-
|
74 |
-
# st.sidebar.markdown(" :cloud: Upload document ")
|
75 |
-
# uploaded_file = st.sidebar.file_uploader('', type=['pdf', 'docx', 'txt']) #Upload PDF File
|
76 |
-
# st.session_state['file'] = uploaded_file
|
|
|
45 |
def run(self):
|
46 |
|
47 |
st.sidebar.write(format_func=lambda app: app['title'])
|
48 |
+
image = Image.open('docStore/img/giz_sdsn_small.jpg')
|
49 |
+
st.sidebar.image(image, width =5)
|
50 |
+
|
|
|
|
|
|
|
|
|
51 |
with st.sidebar:
|
52 |
selected = option_menu(None, [page["title"] for page in self.apps],
|
53 |
icons=[page["icon"] for page in self.apps],
|
54 |
+
menu_icon="cast", default_index=0)
|
55 |
+
st.markdown("---")
|
56 |
|
57 |
|
58 |
for index, item in enumerate(self.apps):
|
|
|
60 |
self.apps[index]["function"]()
|
61 |
break
|
62 |
|
63 |
+
|
64 |
choice = st.sidebar.radio(label = 'Select the Document',
|
65 |
help = 'You can upload the document \
|
66 |
or else you can try a example document',
|
67 |
options = ('Upload Document', 'Try Example'),
|
68 |
horizontal = True)
|
69 |
add_upload(choice)
|
70 |
+
|
|
|
|
|
|