So, I am writing a neural network and it works flawless. But I have decided to make a GUI with tkinter for easy control. My problem is that I can create an instance of the AI in one function, but can not access it form another function in the same hierarchy(no function is in any class). Nn is another python script
def ph1():
n = Nn.neuralNetwork(v, v, v, v)
def ph2():
n.something()
Error code I'm getting:
name 'n' is not defined