From db38c85bde0b431f20f44617c9a3454c9be619a0 Mon Sep 17 00:00:00 2001 From: McCloudS <64094529+McCloudS@users.noreply.github.com> Date: Tue, 19 Mar 2024 13:49:44 -0600 Subject: [PATCH] Fixed uvicorn reload= I'm probably the only person actually using it to reload the script on detected changes. Removed it for everyone else unless they set reload_script_on_change --- subgen/subgen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subgen/subgen.py b/subgen/subgen.py index d2214e8..5086704 100644 --- a/subgen/subgen.py +++ b/subgen/subgen.py @@ -60,6 +60,7 @@ hf_batch_size = int(os.getenv('HF_BATCH_SIZE', 24)) clear_vram_on_complete = convert_to_bool(os.getenv('CLEAR_VRAM_ON_COMPLETE', True)) compute_type = os.getenv('COMPUTE_TYPE', 'auto') append = convert_to_bool(os.getenv('APPEND', False)) +reload_script_on_change = convert_to_bool(os.getenv('RELOAD_SCRIPT_ON_CHANGE', False)) if transcribe_device == "gpu": transcribe_device = "cuda" @@ -764,4 +765,4 @@ if __name__ == "__main__": logging.info(f"Using faster-whisper") if transcribe_folders: transcribe_existing(transcribe_folders) - uvicorn.run("subgen:app", host="0.0.0.0", port=int(webhookport), reload=debug, use_colors=True, reload_include='*.py') + uvicorn.run("subgen:app", host="0.0.0.0", port=int(webhookport), reload=reload_script_on_change, use_colors=True)