Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,7 @@ st.set_page_config(page_title = 'Climate Policy Analysis Assistant',
|
|
8 |
import logging
|
9 |
logging.getLogger().setLevel(logging.INFO)
|
10 |
from utils.uploadAndExample import add_upload
|
11 |
-
|
12 |
-
|
13 |
|
14 |
|
15 |
|
@@ -17,6 +16,7 @@ from PIL import Image
|
|
17 |
|
18 |
|
19 |
|
|
|
20 |
import pkg_resources
|
21 |
installed_packages = pkg_resources.working_set
|
22 |
|
@@ -101,4 +101,17 @@ with st.expander("ℹ️ - About this app", expanded=False):
|
|
101 |
list_ = list_ + f"{package.key}=={package.version}\n"
|
102 |
st.download_button('Download Requirements', list_, file_name='requirements.txt')
|
103 |
|
104 |
-
st.write("")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
import logging
|
9 |
logging.getLogger().setLevel(logging.INFO)
|
10 |
from utils.uploadAndExample import add_upload
|
11 |
+
import appStore.doc_processing as processing
|
|
|
12 |
|
13 |
|
14 |
|
|
|
16 |
|
17 |
|
18 |
|
19 |
+
from PIL import Image
|
20 |
import pkg_resources
|
21 |
installed_packages = pkg_resources.working_set
|
22 |
|
|
|
101 |
list_ = list_ + f"{package.key}=={package.version}\n"
|
102 |
st.download_button('Download Requirements', list_, file_name='requirements.txt')
|
103 |
|
104 |
+
st.write("")
|
105 |
+
|
106 |
+
# apps to be run
|
107 |
+
apps = [processing.app]
|
108 |
+
#, tapp_extraction.app, sector.app, adapmit.app,
|
109 |
+
# conditional.app, subtarget.app, category.app]
|
110 |
+
|
111 |
+
multiplier_val =1/len(apps)
|
112 |
+
if st.button("Analyze Document"):
|
113 |
+
prg = st.progress(0.0)
|
114 |
+
for i,func in enumerate(apps):
|
115 |
+
func()
|
116 |
+
prg.progress((i+1)*multiplier_val)
|
117 |
+
prg.empty()
|