Skip to content

Commit

Permalink
added tqdm for progess bar
Browse files Browse the repository at this point in the history
  • Loading branch information
LMorlok committed Jul 15, 2024
1 parent 2d4b629 commit 7a40a08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/embed_text_package/embed_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

import torch
from tqdm import tqdm


def get_embeddings(sentence_batches: list, model, tokenizer):
Expand Down Expand Up @@ -31,7 +32,8 @@ def get_embeddings(sentence_batches: list, model, tokenizer):

emb_batches = []

for batch in sentence_batches:
for batch in tqdm(sentence_batches,
ascii=True, desc="Embedding Batches..."):
batch_emb = []
for sentence in batch:
# 1) Get Tokens of sentence
Expand Down

0 comments on commit 7a40a08

Please sign in to comment.