If you want to create animations and visualizations for common ML concepts in Python, try ManimML.
The GIF above is the visualization of the Variational Autoencoder made by ManimML.
Link to ManimML.