From d94c2b27e7e3a5342704e3a129965f192c982621 Mon Sep 17 00:00:00 2001 From: sarang-lvs <101888805+sarang-lvs@users.noreply.github.com> Date: Sat, 1 Oct 2022 01:48:46 -0700 Subject: [PATCH] use set_text method instead of .configure use set_text method instead of .configure, when updating the text based on runtime prob., class, and reps counter --- app.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index a4847bf..726d7be 100644 --- a/app.py +++ b/app.py @@ -96,9 +96,17 @@ def detect(): lmain.configure(image=imgtk) lmain.after(10, detect) - counterBox.configure(text=counter) - probBox.configure(text=bodylang_prob[bodylang_prob.argmax()]) - classBox.configure(text=current_stage) + +# counterBox.configure(text=counter) +# probBox.configure(text=bodylang_prob[bodylang_prob.argmax()]) +# classBox.configure(text=current_stage) + +# Sometimes the .configure method does not seem to work giving error of unknonw option "-text" +# So the following method works instead + + probBox.set_text(text=bodylang_prob[bodylang_prob.argmax()]) + classBox.set_text(text = current_stage) + counterBox.set_text(text = counter) detect() window.mainloop()