Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save abhijeet-talaulikar/84124de4c8108a8cf30d9632c1b49a3b to your computer and use it in GitHub Desktop.
Save abhijeet-talaulikar/84124de4c8108a8cf30d9632c1b49a3b to your computer and use it in GitHub Desktop.
# Add GPT 3.5 representation model into BERTopic
openai.api_key = "sk-xxx"
representation_model = OpenAI(model="gpt-3.5-turbo", chat=True)
topic_model = BERTopic(
verbose=True,
hdbscan_model=hdbscan_model,
representation_model=representation_model,
nr_topics=10,
umap_model=umap_model
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment