Skip to content

Commit 144ab7b

Browse files
authored
Add tqdm to _litellm.py (#2408)
1 parent 7724551 commit 144ab7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bertopic/representation/_litellm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import time
22
from litellm import completion
33
import pandas as pd
4+
from tqdm import tqdm
45
from scipy.sparse import csr_matrix
56
from typing import Mapping, List, Tuple, Any
67
from bertopic.representation._base import BaseRepresentation
@@ -120,7 +121,7 @@ def extract_topics(
120121

121122
# Generate using a (Large) Language Model
122123
updated_topics = {}
123-
for topic, docs in repr_docs_mappings.items():
124+
for topic, docs in tqdm(repr_docs_mappings.items(), disable=not topic_model.verbose):
124125
prompt = self._create_prompt(docs, topic, topics)
125126

126127
# Delay

0 commit comments

Comments
 (0)