Skip to content

Commit

Permalink
Adds a sidebar and favicon to existing streamlit apps (#182)
Browse files Browse the repository at this point in the history
* UI: Move intro text to sidebar

* UI: Add favicon and page title

* UI: Add back to top link

* UI: Add sidebar, favicon, back to top
  • Loading branch information
imhalcyon authored Oct 31, 2023
1 parent f73fbd1 commit 73be66d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 53 deletions.
46 changes: 18 additions & 28 deletions streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
from scripts.similarity import get_similarity_score, find_path, read_config
from scripts.utils import get_filenames_from_dir

# Set page configuration
st.set_page_config(page_title='Resume Matcher', page_icon="Assets/img/favicon.ico", initial_sidebar_state='auto')

cwd = find_path('Resume-Matcher')
config_path = os.path.join(cwd, "scripts", "similarity")

Expand Down Expand Up @@ -125,25 +128,23 @@ def tokenize_string(input_string):
return tokens


st.image('Assets/img/header_image.png')

# Display the main title and subheaders
st.title(':blue[Resume Matcher]')
st.subheader(
'Free and Open Source ATS to help your resume pass the screening stage.')
st.markdown(
"Check the website [www.resumematcher.fyi](https://www.resumematcher.fyi/)")
st.markdown(
'⭐ Give Resume Matcher a Star on [GitHub](https://github.com/srbhr/resume-matcher)')
badge(type="github", name="srbhr/Resume-Matcher")
with st.sidebar:
st.image('Assets/img/header_image.png')
st.subheader('Free and Open Source ATS to help your resume pass the screening stage.')
st.markdown('Check the website [www.resumematcher.fyi](https://www.resumematcher.fyi/)')

st.text('For updates follow me on Twitter.')
badge(type="twitter", name="_srbhr_")
st.markdown('Give Resume Matcher a ⭐ on [GitHub](https://github.com/srbhr/resume-matcher)')

st.markdown(
'If you like the project and would like to further help in development please consider 👇')
badge(type="buymeacoffee", name="srbhr")
badge(type="github", name="srbhr/Resume-Matcher")
st.markdown('For updates follow me on Twitter.')
badge(type="twitter", name="_srbhr_")
st.markdown('If you like the project and would like to further help in development please consider 👇')
badge(type="buymeacoffee", name="srbhr")

avs.add_vertical_space(5)
st.divider()
avs.add_vertical_space(1)

resume_names = get_filenames_from_dir("Data/Processed/Resumes")

Expand Down Expand Up @@ -277,16 +278,5 @@ def tokenize_string(input_string):
print("Config file does not exist.")


st.title(':blue[Resume Matcher]')
st.subheader(
'Free and Open Source ATS to help your resume pass the screening stage.')
st.markdown(
'⭐ Give Resume Matcher a Star on [GitHub](https://github.com/srbhr/Resume-Matcher/)')
badge(type="github", name="srbhr/Resume-Matcher")

st.text('For updates follow me on Twitter.')
badge(type="twitter", name="_srbhr_")

st.markdown(
'If you like the project and would like to further help in development please consider 👇')
badge(type="buymeacoffee", name="srbhr")
# Go back to top
st.markdown('[:arrow_up: Back to Top](#resume-matcher)')
44 changes: 19 additions & 25 deletions streamlit_second.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
from annotated_text import annotated_text, parameters
from streamlit_extras.badges import badge
import nltk

# Set page configuration
st.set_page_config(page_title='Resume Matcher', page_icon="Assets/img/favicon.ico", initial_sidebar_state='auto')

nltk.download('punkt')

parameters.SHOW_LABEL_SEPARATOR = False
Expand Down Expand Up @@ -114,25 +118,23 @@ def tokenize_string(input_string):
return tokens


st.image('Assets/img/header_image.png')

# Display the main title and subheaders
st.title(':blue[Resume Matcher]')
st.subheader(
'Free and Open Source ATS to help your resume pass the screening stage.')
st.markdown(
"Check the website [www.resumematcher.fyi](https://www.resumematcher.fyi/)")
st.markdown(
'⭐ Give Resume Matcher a Star on [GitHub](https://github.com/srbhr/Resume-Matcher/)')
badge(type="github", name="srbhr/Resume-Matcher")
with st.sidebar:
st.image('Assets/img/header_image.png')
st.subheader('Free and Open Source ATS to help your resume pass the screening stage.')
st.markdown('Check the website [www.resumematcher.fyi](https://www.resumematcher.fyi/)')

st.text('For updates follow me on Twitter.')
badge(type="twitter", name="_srbhr_")
st.markdown('Give Resume Matcher a ⭐ on [GitHub](https://github.com/srbhr/resume-matcher)')

st.markdown(
'If you like the project and would like to further help in development please consider 👇')
badge(type="buymeacoffee", name="srbhr")
badge(type="github", name="srbhr/Resume-Matcher")
st.markdown('For updates follow me on Twitter.')
badge(type="twitter", name="_srbhr_")
st.markdown('If you like the project and would like to further help in development please consider 👇')
badge(type="buymeacoffee", name="srbhr")

avs.add_vertical_space(5)
st.divider()
avs.add_vertical_space(1)

resume_names = get_filenames_from_dir("Data/Processed/Resumes")

Expand Down Expand Up @@ -334,13 +336,5 @@ def plot_df(df, title):

avs.add_vertical_space(3)

st.markdown(
'⭐ Give Resume Matcher a Star on [GitHub](https://github.com/srbhr/Resume-Matcher/)')
badge(type="github", name="srbhr/Resume-Matcher")

st.text('For updates follow me on Twitter.')
badge(type="twitter", name="_srbhr_")

st.markdown(
'If you like the project and would like to further help in development please consider 👇')
badge(type="buymeacoffee", name="srbhr")
# Go back to top
st.markdown('[:arrow_up: Back to Top](#resume-matcher)')

0 comments on commit 73be66d

Please sign in to comment.