Skip to content

Commit

Permalink
Bug: Having only one file no longer cause an error
Browse files Browse the repository at this point in the history
  • Loading branch information
ILB-96 committed Jul 30, 2023
1 parent 91f0cdd commit cd33156
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,14 @@ def tokenize_string(input_string):

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

st.write("There are", len(resume_names),
output = 0

if len(resume_names) > 1:
st.write("There are", len(resume_names),
" resumes present. Please select one from the menu below:")
output = st.slider('Select Resume Number', 0, len(resume_names)-1, 2)
output = st.slider('Select Resume Number', 0, len(resume_names)-1, 0)
else:
st.write("There is 1 resume present")

avs.add_vertical_space(5)

Expand Down Expand Up @@ -195,10 +200,14 @@ def tokenize_string(input_string):

job_descriptions = get_filenames_from_dir("Data/Processed/JobDescription")

st.write("There are", len(job_descriptions),
output = 0
if len(job_descriptions) > 1:
st.write("There are", len(job_descriptions),
" resumes present. Please select one from the menu below:")
output = st.slider('Select Job Description Number',
0, len(job_descriptions)-1, 2)
output = st.slider('Select Job Description Number',
0, len(job_descriptions)-1, 0)
else:
st.write("There is 1 job description present")

avs.add_vertical_space(5)

Expand Down

0 comments on commit cd33156

Please sign in to comment.