Skip to contents

Fetches best_area_w_0.7.pt from HuggingFace and caches it using BiocFileCache::BiocFileCache(). On subsequent calls the cached file is returned immediately without re-downloading.

Usage

grayleafspot_download_model(force = FALSE, quiet = FALSE)

Arguments

force

Logical. Re-download even if a cached copy already exists.

quiet

Logical. Suppress progress messages.

Value

Invisible character string: absolute path to the downloaded model file.

Details

The function looks for the model in this order:

  1. models/best_area_w_0.7.pt relative to the package root (development).

  2. The BiocFileCache cache keyed under grayleafspotr.

  3. Downloads from HuggingFace and adds it to the cache.

Examples

# \donttest{
  grayleafspot_download_model()
#> Model found in cache: /home/runner/.cache/R/grayleafspotr/1d0d691e0ee5_best_area_w_0.7.pt
#> Download complete.
# }