Spaces:
Sleeping
Sleeping
Commit History
-
Fix 'NoneType has no attribute tokenizer' and harden job failures
Root cause: _use_model only loaded the dedicated Yoruba/Igbo/Hausa models; Whisper loads on first use, and a model switch drops the loaded pipeline. The mixed-language path read en_pipe.pipeline.tokenizer before the model loaded, so Yoruba/Igbo/Hausa jobs that needed the English check failed outright. _use_model now always hands back a loaded model. Error handling: - The English check only refines a transcript; if it fails the recording is read by the dedicated model instead of failing the job. - One automatic retry for unexpected server errors (not for unreadable audio). Nothing is charged until the job settles. - Failed jobs store a plain reason for the user (unreadable file, server busy, too long, or a general retry message) plus the technical cause for staff; /result returns only the user part. - Failures log the full traceback. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>c98b787