knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) reticulate::use_virtualenv("../env")
You can download external datasets to easily build models. External dataset can be found on RaRe-Technologies/gensim-data.
library(gensimr) dataset <- "glove-twitter-25" # model description api_info(dataset) %>% .[["description"]] # download the model model <- api_load(dataset) # find words most similar to "cat" model$most_similar("cat") %>% reticulate::py_to_r()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.