42lux / CaptainCaption

A gradio based image captioning tool that uses the GPT-4-Vision API to generate detailed descriptions of images.
MIT License
51 stars 8 forks source link

Fix worker error #3

Closed MR-444 closed 7 months ago

MR-444 commented 7 months ago

There was definitely a bug in the code: This line is call originally without the num_workers, which leads to running with 4 worker processes always (because it is the parameter default of process_folder: result = process_folder(api_key, folder_path, prompt, detail, max_tokens, pre_prompt, post_prompt, num_workers=worker_slider_local)

More over, I added the rate_limiter class, which throttles the calls after 10 processed images in 1 minute. I commented this out, because running with only 1 thread was sufficient to get not a rate limit error.

42lux commented 7 months ago

Sorry I was really busy the las weeks... looks fine for me and thx for the fix.

42lux commented 7 months ago

I was really busy the last few weeks sorry for the delay and thx for the fix.

MR-444 commented 7 months ago

But it's done, that's what counts. 👍🏼