I'm working on a resume-parser from this link here,
I've cloned it using,
git clone https://github.com/John-8704/ResumeFilter.git
and then just execute:
python utils/create_training_data.py
This just open the tinker GUI tool required for manually annotate data but it doesn't have a scroll bar to scroll through.
So I've edited that script i.e.,create_training_data.py
in it I've modified the resume_gui function
with below code to add scroll bar functionality but even then the scroll bar is not visible. How can I add scrollbar to it.
To reproduce,
Just clone the repo and try running python utils/create_training_data.py
def resume_gui(training_data_dir_path, index, file_path, file_content):
lines_with_dummy_labels = [[line, -1, -1] for line in file_content]
master = Tk()
master.columnconfigure(0, weight=1)
master.rowconfigure(0, weight=1)
master.geometry("{0}x{1}+0+0".format(master.winfo_screenwidth(),
master.winfo_screenheight()))
canvas = Canvas(master, width=170, height=300)
vsb = Scrollbar(master, orient="vertical", command=canvas.yview)
canvas.grid(row=0, column=0, sticky=W + E + N + S)
vsb.grid(row=0, column=1, sticky=N+S)
gui = LabelResume(master, lines_with_dummy_labels)
def callback():
master.destroy()
output_file_path = os.path.join(training_data_dir_path, str(index)+'.csv')
if os.path.exists(output_file_path):
return
data = pd.DataFrame.from_records(lines_with_dummy_labels,columns=['text',
'type','label'])
rows_to_drop = data.loc[((data['type']== -1) | (data['label'] == -1))].index
data.drop(data.index[rows_to_drop],inplace = True,axis = 0)
data.to_csv(output_file_path,index = False)
canvas.config(yscrollcommand= vsb.set, scrollregion=canvas.bbox("all"))
master.protocol("WM_DELETE_WINDOW", callback)
gui.mainloop()
If someone can help me out I'd really appreciate it.