How to avoid real-time plot from freezing due to model prediction (1~2 seconds freezing) in pyqt6
I am doing a GUI for real-time data collection app using pyqt6, in this app I integrate a trained model. The app works fine without this model, however when it is time to do the prediction, the GUI freezes for around 2 seconds (real-time plots are not updated in this time), causes also the reading/writing process to be affected. Below is my code.