Skip to content

Commit

Permalink
fix: gpt progress logic is broken (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelass authored Feb 2, 2024
1 parent b5d3ee4 commit 8bb04a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/helpers/caption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export async function runGPTV(
const imageFiles = getImageFiles(directory);

window_.webContents.send("caption-progress", {
progress: 0,
percent: 0,
completedCount: 0,
totalCount: imageFiles.length,
});
Expand Down Expand Up @@ -188,7 +188,7 @@ ${guidelines}
console.log(`Description for ${file} written to ${textFilePath}`);
})
);
const completedCount = index + 1;
const completedCount = index + batchSize;
const percent = (completedCount / imageFiles.length) * 100;
window_.webContents.send("caption-progress", {
percent,
Expand Down

0 comments on commit 8bb04a5

Please sign in to comment.