Skip to content

Commit

Permalink
Fix slow model downloads by changing download source
Browse files Browse the repository at this point in the history
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 robertknight/rten#22
  • Loading branch information
robertknight committed Jan 1, 2024
1 parent a9a9681 commit 26175d4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ocrs-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,11 @@ impl<T, E: std::fmt::Display> FileErrorContext<T> for Result<T, E> {
}

/// 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<dyn Error>> {
let args = parse_args()?;
Expand Down

0 comments on commit 26175d4

Please sign in to comment.