diff --git a/beam_decoder.py b/beam_decoder.py index b9768ef..e9bb93f 100644 --- a/beam_decoder.py +++ b/beam_decoder.py @@ -1,4 +1,5 @@ import torch +import tqdm class Beam: @@ -214,7 +215,7 @@ def collect_hypothesis_and_scores(inst_dec_beams, n_best): inst_idx_to_position_map = get_inst_idx_to_tensor_position_map(active_inst_idx_list) # -- Decode - for len_dec_seq in range(1, max_len + 1): + for len_dec_seq in tqdm.tqdm(range(1, max_len + 1)): if is_terminated is not None and is_terminated(): return None, None diff --git a/requirements.txt b/requirements.txt index b61ed42..1ee0ba3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ torch pyqt6 opencc +tqdm