From 42690f2d76f4bb88a17eec85bfd09fbaac8dde08 Mon Sep 17 00:00:00 2001 From: martinb-bb <105685594+martinb-bb@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:28:18 -0500 Subject: [PATCH] tqdm --- openbb_terminal/forecast/whisper_view.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openbb_terminal/forecast/whisper_view.py b/openbb_terminal/forecast/whisper_view.py index 76a740e93b6..fb4517113af 100644 --- a/openbb_terminal/forecast/whisper_view.py +++ b/openbb_terminal/forecast/whisper_view.py @@ -2,6 +2,7 @@ __docformat__ = "numpy" import logging +from tqdm import tqdm from typing import Union, Optional, List from datetime import datetime @@ -122,7 +123,8 @@ def transcribe_and_summarize( # process each chunk and concatenate the summaries summary_text = "" - for chunk in chunks: + # tqdm is used to show a progress bar + for chunk in tqdm(chunks): # encode the chunk using the tokenizer inputs = tokenizer( chunk, return_tensors="pt", truncation=True, max_length=1024