tests/testthat/helper-skips.R

skip_if_no_token <- function() {
  token <- Sys.getenv("HUGGINGFACE_HUB_TOKEN", "")
  if (token == "") {
    token <- Sys.getenv("HUGGING_FACE_HUB_TOKEN", "")
  }

  if (token == "")
    skip("No auth token set.")
}

Try the hfhub package in your browser

Any scripts or data that you put into this service are public.

hfhub documentation built on Aug. 19, 2023, 1:07 a.m.