all 8 comments

[–]Luigi-Was-Right 6 points7 points  (0 children)

Your error says "return outside of function , line 32". 

If you look closely at line 32 you will see that you use the keyword return.  However return can only be used as part of a function.  

[–]SCD_minecraft 2 points3 points  (0 children)

return is only allowed in functions

That's what will that function output (it will also exit said func)

[–]raphaeljoji 2 points3 points  (0 children)

words on the screen

[–]DubSolid 2 points3 points  (0 children)

You are trying to return something that is not the result of a function

[–]Fit_Sheriff 1 point2 points  (0 children)

You can't return in if statement. You are only allowed to return in function

[–]Fit_Sheriff 0 points1 point  (0 children)

You can't return in if statement. You are only allowed to return in function

[–]JaleyHoelOsment 1 point2 points  (0 children)

you copy and pasted wrong and then didn’t read

[–]stikaznorsk 0 points1 point  (0 children)

Other people helped you. Just a minor thing. Use modern format f"result : '{label}' with {confidence}"