# \donttest{
if (exists("topic_model") && exists("texts_cleaned") && exists("reduced_embeddings")) {
visualize_documents(model = topic_model,
texts = texts_cleaned,
reduced_embeddings = reduced_embeddings,
custom_labels = FALSE,
hide_annotation = TRUE,
filename = "visualize_documents",
auto_open = FALSE)
} else {
message("Missing topic_model/texts_cleaned/reduced_embeddings. Train a model first.")
}
# }
Run the code above in your browser using DataLab