Twin activate hangs and not responding when running simulation
I have a Twin Activate project where I’ve established communication between a Python block and a MotionSolve block. The MotionSolve block runs a simulation of an automatic motorcycle. I’m passing an input from the MotionSolve block to the Python block, and the Python block also sends an output that is received by the MotionSolve block as an input.

When I try to run the simulation, the software hangs and not responding, so I have to forcefully close the application.
Below is the Python script I’m trying to run. This script loads an AI model that predicts the gear ratio of the motorcycle based on input received from the MotionSolve block and returns the prediction as an input to the MotionSolve block.