Skip to content

Commit

Permalink
fix: always create csv directory if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
fboulnois committed Jul 6, 2024
1 parent de587e5 commit 5f9cbb1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion huggingface.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ set_working_directory <- function() {
cwd <- dirname(fp[!is.na(fp)])
}
setwd(cwd)
cwd
}

dir_create_csv <- function(cwd) {
dir.create(file.path(cwd, "csv"), showWarnings = FALSE, recursive = TRUE)
}

# implement extract2 from magrittr
Expand Down Expand Up @@ -146,7 +151,8 @@ dt_if_missing <- function(file, fn, ...) {
}
}

set_working_directory()
cwd <- set_working_directory()
dir_create_csv(cwd)

url <- "https://open-llm-leaderboard-old-open-llm-leaderboard.hf.space/"
file <- "huggingface.csv"
Expand Down

0 comments on commit 5f9cbb1

Please sign in to comment.