Abhishek Mathur commited on
Commit
1f69bf1
Β·
unverified Β·
1 Parent(s): 83f2571

Adds a sidebar and favicon to existing streamlit apps (#182)

Browse files

* 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

Files changed (2) hide show
  1. streamlit_app.py +18 -28
  2. streamlit_second.py +19 -25
streamlit_app.py CHANGED
@@ -15,6 +15,9 @@ from streamlit_extras.badges import badge
15
  from scripts.similarity import get_similarity_score, find_path, read_config
16
  from scripts.utils import get_filenames_from_dir
17
 
 
 
 
18
  cwd = find_path('Resume-Matcher')
19
  config_path = os.path.join(cwd, "scripts", "similarity")
20
 
@@ -125,25 +128,23 @@ def tokenize_string(input_string):
125
  return tokens
126
 
127
 
128
- st.image('Assets/img/header_image.png')
129
-
130
  st.title(':blue[Resume Matcher]')
131
- st.subheader(
132
- 'Free and Open Source ATS to help your resume pass the screening stage.')
133
- st.markdown(
134
- "Check the website [www.resumematcher.fyi](https://www.resumematcher.fyi/)")
135
- st.markdown(
136
- '⭐ Give Resume Matcher a Star on [GitHub](https://github.com/srbhr/resume-matcher)')
137
- badge(type="github", name="srbhr/Resume-Matcher")
138
 
139
- st.text('For updates follow me on Twitter.')
140
- badge(type="twitter", name="_srbhr_")
141
 
142
- st.markdown(
143
- 'If you like the project and would like to further help in development please consider πŸ‘‡')
144
- badge(type="buymeacoffee", name="srbhr")
 
 
145
 
146
- avs.add_vertical_space(5)
 
147
 
148
  resume_names = get_filenames_from_dir("Data/Processed/Resumes")
149
 
@@ -277,16 +278,5 @@ else:
277
  print("Config file does not exist.")
278
 
279
 
280
- st.title(':blue[Resume Matcher]')
281
- st.subheader(
282
- 'Free and Open Source ATS to help your resume pass the screening stage.')
283
- st.markdown(
284
- '⭐ Give Resume Matcher a Star on [GitHub](https://github.com/srbhr/Resume-Matcher/)')
285
- badge(type="github", name="srbhr/Resume-Matcher")
286
-
287
- st.text('For updates follow me on Twitter.')
288
- badge(type="twitter", name="_srbhr_")
289
-
290
- st.markdown(
291
- 'If you like the project and would like to further help in development please consider πŸ‘‡')
292
- badge(type="buymeacoffee", name="srbhr")
 
15
  from scripts.similarity import get_similarity_score, find_path, read_config
16
  from scripts.utils import get_filenames_from_dir
17
 
18
+ # Set page configuration
19
+ st.set_page_config(page_title='Resume Matcher', page_icon="Assets/img/favicon.ico", initial_sidebar_state='auto')
20
+
21
  cwd = find_path('Resume-Matcher')
22
  config_path = os.path.join(cwd, "scripts", "similarity")
23
 
 
128
  return tokens
129
 
130
 
131
+ # Display the main title and subheaders
 
132
  st.title(':blue[Resume Matcher]')
133
+ with st.sidebar:
134
+ st.image('Assets/img/header_image.png')
135
+ st.subheader('Free and Open Source ATS to help your resume pass the screening stage.')
136
+ st.markdown('Check the website [www.resumematcher.fyi](https://www.resumematcher.fyi/)')
 
 
 
137
 
138
+ st.markdown('Give Resume Matcher a ⭐ on [GitHub](https://github.com/srbhr/resume-matcher)')
 
139
 
140
+ badge(type="github", name="srbhr/Resume-Matcher")
141
+ st.markdown('For updates follow me on Twitter.')
142
+ badge(type="twitter", name="_srbhr_")
143
+ st.markdown('If you like the project and would like to further help in development please consider πŸ‘‡')
144
+ badge(type="buymeacoffee", name="srbhr")
145
 
146
+ st.divider()
147
+ avs.add_vertical_space(1)
148
 
149
  resume_names = get_filenames_from_dir("Data/Processed/Resumes")
150
 
 
278
  print("Config file does not exist.")
279
 
280
 
281
+ # Go back to top
282
+ st.markdown('[:arrow_up: Back to Top](#resume-matcher)')
 
 
 
 
 
 
 
 
 
 
 
streamlit_second.py CHANGED
@@ -10,6 +10,10 @@ from streamlit_extras import add_vertical_space as avs
10
  from annotated_text import annotated_text, parameters
11
  from streamlit_extras.badges import badge
12
  import nltk
 
 
 
 
13
  nltk.download('punkt')
14
 
15
  parameters.SHOW_LABEL_SEPARATOR = False
@@ -114,25 +118,23 @@ def tokenize_string(input_string):
114
  return tokens
115
 
116
 
117
- st.image('Assets/img/header_image.png')
118
-
119
  st.title(':blue[Resume Matcher]')
120
- st.subheader(
121
- 'Free and Open Source ATS to help your resume pass the screening stage.')
122
- st.markdown(
123
- "Check the website [www.resumematcher.fyi](https://www.resumematcher.fyi/)")
124
- st.markdown(
125
- '⭐ Give Resume Matcher a Star on [GitHub](https://github.com/srbhr/Resume-Matcher/)')
126
- badge(type="github", name="srbhr/Resume-Matcher")
127
 
128
- st.text('For updates follow me on Twitter.')
129
- badge(type="twitter", name="_srbhr_")
130
 
131
- st.markdown(
132
- 'If you like the project and would like to further help in development please consider πŸ‘‡')
133
- badge(type="buymeacoffee", name="srbhr")
 
 
134
 
135
- avs.add_vertical_space(5)
 
136
 
137
  resume_names = get_filenames_from_dir("Data/Processed/Resumes")
138
 
@@ -334,13 +336,5 @@ plot_df(df4, 'Job Description Java Developer 3 Years of Experien')
334
 
335
  avs.add_vertical_space(3)
336
 
337
- st.markdown(
338
- '⭐ Give Resume Matcher a Star on [GitHub](https://github.com/srbhr/Resume-Matcher/)')
339
- badge(type="github", name="srbhr/Resume-Matcher")
340
-
341
- st.text('For updates follow me on Twitter.')
342
- badge(type="twitter", name="_srbhr_")
343
-
344
- st.markdown(
345
- 'If you like the project and would like to further help in development please consider πŸ‘‡')
346
- badge(type="buymeacoffee", name="srbhr")
 
10
  from annotated_text import annotated_text, parameters
11
  from streamlit_extras.badges import badge
12
  import nltk
13
+
14
+ # Set page configuration
15
+ st.set_page_config(page_title='Resume Matcher', page_icon="Assets/img/favicon.ico", initial_sidebar_state='auto')
16
+
17
  nltk.download('punkt')
18
 
19
  parameters.SHOW_LABEL_SEPARATOR = False
 
118
  return tokens
119
 
120
 
121
+ # Display the main title and subheaders
 
122
  st.title(':blue[Resume Matcher]')
123
+ with st.sidebar:
124
+ st.image('Assets/img/header_image.png')
125
+ st.subheader('Free and Open Source ATS to help your resume pass the screening stage.')
126
+ st.markdown('Check the website [www.resumematcher.fyi](https://www.resumematcher.fyi/)')
 
 
 
127
 
128
+ st.markdown('Give Resume Matcher a ⭐ on [GitHub](https://github.com/srbhr/resume-matcher)')
 
129
 
130
+ badge(type="github", name="srbhr/Resume-Matcher")
131
+ st.markdown('For updates follow me on Twitter.')
132
+ badge(type="twitter", name="_srbhr_")
133
+ st.markdown('If you like the project and would like to further help in development please consider πŸ‘‡')
134
+ badge(type="buymeacoffee", name="srbhr")
135
 
136
+ st.divider()
137
+ avs.add_vertical_space(1)
138
 
139
  resume_names = get_filenames_from_dir("Data/Processed/Resumes")
140
 
 
336
 
337
  avs.add_vertical_space(3)
338
 
339
+ # Go back to top
340
+ st.markdown('[:arrow_up: Back to Top](#resume-matcher)')