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 9a69d7d
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def create_star_graph(nodes_and_weights, title):
node_adjacencies = []
node_text = []
for node in G.nodes():
adjacencies = list(G.adj[node]) # changes here
adjacencies = list(G.adj[node]) # changes herex
node_adjacencies.append(len(adjacencies))
node_text.append(f'{node}<br># of connections: {len(adjacencies)}')

Expand Down 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 9a69d7d

Please sign in to comment.