(documents, document_embeddings, embedding_model)
| 48 | |
| 49 | @pytest.fixture(scope="session") |
| 50 | def base_topic_model(documents, document_embeddings, embedding_model): |
| 51 | model = BERTopic(embedding_model=embedding_model, calculate_probabilities=True) |
| 52 | model.umap_model.random_state = 42 |
| 53 | model.hdbscan_model.min_cluster_size = 3 |
| 54 | model.fit(documents, document_embeddings) |
| 55 | return model |
| 56 | |
| 57 | |
| 58 | @pytest.fixture(scope="session") |