Update app.R
Browse files
app.R
CHANGED
|
@@ -40,6 +40,9 @@ use_python("/usr/bin/python3", required = TRUE)
|
|
| 40 |
#Allows the app to read models and data from the CleanDataObjects private dataset on the HyannisHarborHawksCCBL HF
|
| 41 |
HF_READ_TOKEN <- Sys.getenv("READ_CLEANDATAOBJ_TOKEN")
|
| 42 |
|
|
|
|
|
|
|
|
|
|
| 43 |
#Allows the app to poll GitHub to scrape (read and write access token)
|
| 44 |
gh_token <- Sys.getenv("GITHUB_TOKEN")
|
| 45 |
|
|
@@ -69,7 +72,7 @@ hf_target_for <- function(source) {
|
|
| 69 |
|
| 70 |
download_private_parquet <- function(repo_id, filename, max_retries = 3) {
|
| 71 |
url <- paste0("https://huggingface.co/datasets/", repo_id, "/resolve/main/", filename)
|
| 72 |
-
api_key <-
|
| 73 |
if (api_key == "") stop("API key is not set.")
|
| 74 |
for (attempt in 1:max_retries) {
|
| 75 |
tryCatch({
|
|
|
|
| 40 |
#Allows the app to read models and data from the CleanDataObjects private dataset on the HyannisHarborHawksCCBL HF
|
| 41 |
HF_READ_TOKEN <- Sys.getenv("READ_CLEANDATAOBJ_TOKEN")
|
| 42 |
|
| 43 |
+
#Allows the app to read models and data from the PastSeasonData private dataset on the HyannisHarborHawksCCBL HF
|
| 44 |
+
HF_READ_TOKEN_PASTSEASONDATA <- Sys.getenv("READ_PASTSEASONDATA_TOKEN")
|
| 45 |
+
|
| 46 |
#Allows the app to poll GitHub to scrape (read and write access token)
|
| 47 |
gh_token <- Sys.getenv("GITHUB_TOKEN")
|
| 48 |
|
|
|
|
| 72 |
|
| 73 |
download_private_parquet <- function(repo_id, filename, max_retries = 3) {
|
| 74 |
url <- paste0("https://huggingface.co/datasets/", repo_id, "/resolve/main/", filename)
|
| 75 |
+
api_key <- HF_READ_TOKEN_PASTSEASONDATA
|
| 76 |
if (api_key == "") stop("API key is not set.")
|
| 77 |
for (attempt in 1:max_retries) {
|
| 78 |
tryCatch({
|