downloading full requirements txt
Browse files- modules/navbar.py +51 -45
modules/navbar.py
CHANGED
|
@@ -1,45 +1,51 @@
|
|
| 1 |
-
import streamlit as st
|
| 2 |
-
import app_matching_page
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
#
|
| 6 |
-
#
|
| 7 |
-
#
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
#
|
| 12 |
-
#
|
| 13 |
-
#
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
"
|
| 31 |
-
"
|
| 32 |
-
"
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
with
|
| 45 |
-
app_matching_page.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import app_matching_page
|
| 3 |
+
import pkg_resources
|
| 4 |
+
|
| 5 |
+
# giz-dsc colors
|
| 6 |
+
# orange: #e5b50d
|
| 7 |
+
# green: #48d47b
|
| 8 |
+
# blue: #0da2dc
|
| 9 |
+
# grey: #dadada
|
| 10 |
+
|
| 11 |
+
# giz colors https://www.giz.de/cdc/en/html/59638.html
|
| 12 |
+
# red: #c80f0f
|
| 13 |
+
# grey: #6f6f6f
|
| 14 |
+
# light_grey: #b2b2b2
|
| 15 |
+
# light_red: #eba1a3
|
| 16 |
+
|
| 17 |
+
def show_navbar():
|
| 18 |
+
#st.markdown("<h1 style='color: red;'>THIS APP IS WORK IN PROGRESS ...</h1>", unsafe_allow_html=True)
|
| 19 |
+
|
| 20 |
+
# enlarge tab fontsizes
|
| 21 |
+
css = '''
|
| 22 |
+
<style>
|
| 23 |
+
.stTabs [data-baseweb="tab-list"] button [data-testid="stMarkdownContainer"] p {
|
| 24 |
+
font-size:1rem;
|
| 25 |
+
}
|
| 26 |
+
</style>
|
| 27 |
+
'''
|
| 28 |
+
st.markdown(css, unsafe_allow_html=True)
|
| 29 |
+
tab1, tab2, tab3, tab4 = st.tabs([
|
| 30 |
+
"📘 Landing Page",
|
| 31 |
+
"📊 All Projects",
|
| 32 |
+
"🎯 Single-Project Matching",
|
| 33 |
+
"🔍 Multi-Project Matching"
|
| 34 |
+
])
|
| 35 |
+
|
| 36 |
+
with tab1:
|
| 37 |
+
app_matching_page.show_landing_page()
|
| 38 |
+
installed_packages = pkg_resources.working_set
|
| 39 |
+
package_list_ = ""
|
| 40 |
+
for package in installed_packages:
|
| 41 |
+
package_list_ = package_list_ + f"{package.key}=={package.version}\n"
|
| 42 |
+
st.download_button('Download Requirements', list_, file_name='Synergy_requirements.txt')
|
| 43 |
+
|
| 44 |
+
with tab2:
|
| 45 |
+
app_matching_page.show_all_projects_page()
|
| 46 |
+
|
| 47 |
+
with tab3:
|
| 48 |
+
app_matching_page.show_single_matching_page()
|
| 49 |
+
|
| 50 |
+
with tab4:
|
| 51 |
+
app_matching_page.show_multi_matching_page()
|