The next part was to connect the Neural Network to the VR environment. So, first, we loaded the saved NN model into a separate notebook. We then set up the model and the VR environment over a localhost connection, with both the client (the model) and the server on the same device. Every 5 seconds, we simulated streaming EEG data by passing in data from one of the rows in our testing set into the model. The model sends its prediction to the server. The VR environment then reads the prediction and make the necessary changes.