Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,64 +1,14 @@
|
|
| 1 |
-
#import appStore.
|
| 2 |
-
|
|
|
|
| 3 |
import streamlit as st
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
# App
|
| 8 |
-
|
| 9 |
-
st.set_page_config(page_title = 'Vulnerable Groups Identification',
|
| 10 |
initial_sidebar_state='expanded', layout="wide")
|
| 11 |
|
| 12 |
-
|
| 13 |
-
# upload and example doc
|
| 14 |
-
choice = st.sidebar.radio(label = 'Select the Document',
|
| 15 |
-
help = 'You can upload the document \
|
| 16 |
-
or else you can try a example document',
|
| 17 |
-
options = ('Upload Document', 'Try Example'),
|
| 18 |
-
horizontal = True)
|
| 19 |
-
add_upload(choice)
|
| 20 |
-
|
| 21 |
-
with st.container():
|
| 22 |
-
st.markdown("<h2 style='text-align: center; color: black;'> Vulnerable Groups Identification </h2>", unsafe_allow_html=True)
|
| 23 |
-
st.write(' ')
|
| 24 |
-
|
| 25 |
-
with st.expander("ℹ️ - About this app", expanded=False):
|
| 26 |
-
st.write(
|
| 27 |
-
"""
|
| 28 |
-
The Vulnerable Groups Identification App is an open-source\
|
| 29 |
-
digital tool which aims to assist policy analysts and \
|
| 30 |
-
other users in extracting and filtering relevant \
|
| 31 |
-
information from public documents.
|
| 32 |
-
""")
|
| 33 |
-
st.write('**Definitions**')
|
| 34 |
-
|
| 35 |
-
st.caption("""
|
| 36 |
-
- **Place holder**: Place holder \
|
| 37 |
-
Place holder \
|
| 38 |
-
Place holder \
|
| 39 |
-
Place holder \
|
| 40 |
-
Place holder
|
| 41 |
-
""")
|
| 42 |
-
|
| 43 |
-
st.write("""
|
| 44 |
-
What happens in the background?
|
| 45 |
-
|
| 46 |
-
- Step 1: Once the document is provided to app, it undergoes *Pre-processing*.\
|
| 47 |
-
In this step the document is broken into smaller paragraphs \
|
| 48 |
-
(based on word/sentence count).
|
| 49 |
-
- Step 2: The paragraphs are fed to **Target Classifier** which detects if
|
| 50 |
-
the paragraph contains any *Target* related information or not.
|
| 51 |
-
- Step 3: The paragraphs which are detected containing some target \
|
| 52 |
-
related information are then fed to multiple classifier to enrich the
|
| 53 |
-
Information Extraction.
|
| 54 |
-
|
| 55 |
-
The Step 2 and 3 are repated then similarly for Action and Policies & Plans.
|
| 56 |
-
""")
|
| 57 |
-
|
| 58 |
-
st.write("")
|
| 59 |
|
|
|
|
|
|
|
| 60 |
|
| 61 |
-
|
| 62 |
-
if st.button("Analyze Document"):
|
| 63 |
-
print("Analyse")
|
| 64 |
-
#groups_extraction.identify_groups()
|
|
|
|
| 1 |
+
#import appStore.sdg_analysis as sdg_analysis
|
| 2 |
+
#import appStore.info as info
|
| 3 |
+
from appStore.multiapp import MultiApp
|
| 4 |
import streamlit as st
|
| 5 |
|
| 6 |
+
st.set_page_config(page_title = 'Vulnerability Classifier',
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
initial_sidebar_state='expanded', layout="wide")
|
| 8 |
|
| 9 |
+
app = MultiApp()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
app.add_app("About","house", info.app)
|
| 12 |
+
app.add_app("SDG Analysis","gear",sdg_analysis.app)
|
| 13 |
|
| 14 |
+
app.run()
|
|
|
|
|
|
|
|
|