A python script to use a Tensorflow Keras model (e.g. trained with Teachable Machine) to control your keyboard
- Install the latest version of Python that is supported by Tensorflow (See the Software Requirements for Tensorflow). This script was tested with Python 3.11. Make sure to 'Add Python to the PATH' during the installation.
- Open a console, type
python --version
to see if Python is installed correctly, it should return the version number. - To install all the scripts' dependencies, type
pip install tensorflow opencv-python pydirectinput
. - Download and extract script.py and RUN.bat into a folder on your pc.
- Train an Teachable Machine image model with 5 classes named exactly
neutral
up
down
left
right
- Download as a Tensorflow Keras model and place the files in the folder you created earlier
- Make sure the webcam is not used by any other application like the browser
- Run RUN.bat
- See the included pdf file for instructions aimed at students