# \donttest{
if (exists("topic_model") && exists("probs")) {
visualize_distribution(
model = topic_model,
text_id = 1,
probabilities = probs,
filename = "custom_filename",
auto_open = TRUE
)
} else {
message("No topic_model/probs found. Please train or load a model first.")
}
# }
Run the code above in your browser using DataLab