Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from streamlit_option_menu import option_menu
|
| 3 |
+
from github_analytics.home import github_analytics
|
| 4 |
+
# import project_recommender
|
| 5 |
+
from project_recommender.app import project_recommendation
|
| 6 |
+
from home_page import home_page
|
| 7 |
+
|
| 8 |
+
# Set the layout to make the navigation menu appear sideways
|
| 9 |
+
st.set_page_config(layout="wide")
|
| 10 |
+
|
| 11 |
+
# Create a sidebar for the navigation menu
|
| 12 |
+
with st.sidebar:
|
| 13 |
+
# Navigation menu
|
| 14 |
+
selected_page = option_menu(
|
| 15 |
+
menu_title="Career Enhancer",
|
| 16 |
+
options=["Home", "Github Analytics", "Custom Project Recommendation"],
|
| 17 |
+
icons=["house", "github", "star"], # Optional icons
|
| 18 |
+
default_index=0, # Set the default option to "Home"
|
| 19 |
+
styles={
|
| 20 |
+
"container": {"padding": "0!important"},
|
| 21 |
+
"icon": {"color": "orange", "font-size": "20px"},
|
| 22 |
+
"nav-link": {"font-size": "16px", "text-align": "left", "margin": "0px", "--hover-color": "#eee"},
|
| 23 |
+
"nav-link-selected": {"background-color": "#02ab21"},
|
| 24 |
+
}
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
# Create a container for the main content area
|
| 28 |
+
main_content = st.container()
|
| 29 |
+
|
| 30 |
+
# Display content based on selection
|
| 31 |
+
if selected_page == "Home":
|
| 32 |
+
with main_content:
|
| 33 |
+
home_page()
|
| 34 |
+
elif selected_page == "Github Analytics":
|
| 35 |
+
with main_content:
|
| 36 |
+
github_analytics()
|
| 37 |
+
elif selected_page == "Custom Project Recommendation":
|
| 38 |
+
with main_content:
|
| 39 |
+
project_recommendation()
|