From 6829dfda09ee5b3ce3b71b4acbf9c31660b5bdaf Mon Sep 17 00:00:00 2001 From: Dazed Date: Tue, 26 Sep 2023 15:22:01 -0500 Subject: [PATCH] Fix critical issue with tyrano --- modules/tyrano.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/tyrano.py b/modules/tyrano.py index b7a30e6..2b2dc5c 100644 --- a/modules/tyrano.py +++ b/modules/tyrano.py @@ -183,6 +183,7 @@ def translateTyrano(data, pbar): for line in matchList: data.insert(i, line.strip() + '[p]\n') i+=1 + i-=1 # else: # print ('No Matches') if translatedText != '': @@ -316,4 +317,5 @@ def translateGPT(t, history, fullPromptFlag): if len(translatedText) > 15 * len(t) or "I'm sorry, but I'm unable to assist with that translation" in translatedText: return [t, response.usage.total_tokens] else: + return [translatedText, tokens] \ No newline at end of file