have a look at some examples: - https://github.com/rstudio/tensorflow - https://github.com/rstudio/reticulate - https://github.com/greta-dev/greta