From 26175d47c8dca7b4be36f53f962c2b57f78066a9 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 1 Jan 2024 15:15:57 +0000 Subject: [PATCH] Fix slow model downloads by changing download source Fix slow model downloads by moving models to a different bucket which has S3 Transfer Acceleration enabled. I couldn't enable this for the original bucket because AWS doesn't support S3TA for buckets with a period in their name. With the original URL I was able to reproduce sporadic slow downloads when downloading with ureq, reqwest and curl. Fixes https://github.com/robertknight/rten/issues/22 --- ocrs-cli/src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ocrs-cli/src/main.rs b/ocrs-cli/src/main.rs index c6c944b..65af557 100644 --- a/ocrs-cli/src/main.rs +++ b/ocrs-cli/src/main.rs @@ -206,12 +206,11 @@ impl FileErrorContext for Result { } /// Default text detection model. -const DETECTION_MODEL: &str = - "https://s3.amazonaws.com/io.github.robertknight/ocrs-models/text-detection.rten"; +const DETECTION_MODEL: &str = "https://ocrs-models.s3-accelerate.amazonaws.com/text-detection.rten"; /// Default text recognition model. const RECOGNITION_MODEL: &str = - "https://s3.amazonaws.com/io.github.robertknight/ocrs-models/text-recognition.rten"; + "https://ocrs-models.s3-accelerate.amazonaws.com/text-recognition.rten"; fn main() -> Result<(), Box> { let args = parse_args()?;