From b91ecea12297d0ebf64eb6a09529eb458afb4103 Mon Sep 17 00:00:00 2001 From: Dazed Date: Thu, 6 Apr 2023 04:44:25 -0500 Subject: [PATCH] fix: Fix the pbar duplication --- main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 416eeff..3eda02e 100644 --- a/main.py +++ b/main.py @@ -82,13 +82,14 @@ def parseMap(data, filename): for page in event['pages']: totalLines += len(page['list']) - with tqdm(total = totalLines, leave=False, desc=filename, bar_format='{l_bar}{bar:10}{r_bar}{bar:-10b}', position=0) as pbar: + with tqdm(total = totalLines, leave=False, desc=filename, bar_format='{l_bar}{bar:10}{r_bar}{bar:-10b}', position=0, delay=10) as pbar: for event in events: if event is not None: with ThreadPoolExecutor(max_workers=THREADS) as executor: for page in event['pages']: - future = executor.submit(searchCodes, page, pbar) - + future = executor.submit(searchCodes, page, pbar) + pbar.close() + # Verify if an exception was thrown try: totalTokens += future.result() @@ -179,7 +180,7 @@ When I give you something to translate, answer with just the translation.\ Translation Examples:\ \\n<ルイ>そう、私はルイよ。= \\n Yes, I'm Rui.\ \\nそう、私はルイよ。= \\nYes, I'm Rui.\ -\\n<瑠唯>イヤァァァ\"ァ\"ァ\"ァ\"ァ\"っ!!? = \\n Iyaaa\"a\"a\"a\"a\!!?\ +\\n<瑠唯>イヤァァァ\"ァ\"ァ\"ァ\"ァ\"っ!!? = \\n Iyaaaaaaa\!!?\ \\nイグぅぅぅぅぅぅぅゥゥゥゥゥゥっ!!!♡♡♡ = \\nIguuuuuuuuuuuuu!!!♡♡♡" response = openai.ChatCompletion.create( temperature=0,