Possible fix for csv
This commit is contained in:
parent
ac9fd2f12f
commit
ca578dc874
2 changed files with 10 additions and 10 deletions
|
|
@ -280,15 +280,15 @@ def translateCSV(reader, pbar, writer, textHistory, format):
|
|||
if len(translatedTextList) != len(payload):
|
||||
pbar.write(f'Mismatch Error: {i-BATCHSIZE}-{i}')
|
||||
batch.clear()
|
||||
|
||||
# Set Data
|
||||
j = i - len(batch)
|
||||
for row in translatedTextList:
|
||||
row = row.replace('"', '\\"')
|
||||
row = row.replace(',', '\,')
|
||||
data[j][1] = row
|
||||
j += 1
|
||||
batch.clear()
|
||||
else:
|
||||
# Set Data
|
||||
j = i - len(batch)
|
||||
for row in translatedTextList:
|
||||
row = row.replace('"', '\\"')
|
||||
row = row.replace(',', '\,')
|
||||
data[j][1] = row
|
||||
j += 1
|
||||
batch.clear()
|
||||
|
||||
# Write all Data
|
||||
with LOCK:
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ if 'gpt-3.5' in MODEL:
|
|||
elif 'gpt-4' in MODEL:
|
||||
INPUTAPICOST = .01
|
||||
OUTPUTAPICOST = .03
|
||||
BATCHSIZE = 4
|
||||
BATCHSIZE = 40
|
||||
FREQUENCY_PENALTY = 0.1
|
||||
|
||||
#tqdm Globals
|
||||
|
|
|
|||
Loading…
Reference in a new issue