summaryrefslogtreecommitdiff
path: root/candle-examples/examples/bert
diff options
context:
space:
mode:
authorNicolas Patry <patry.nicolas@protonmail.com>2023-07-27 20:05:02 +0200
committerNicolas Patry <patry.nicolas@protonmail.com>2023-07-27 20:05:02 +0200
commitca479a873eeebb21cdef1e2a95d11fea742390f4 (patch)
tree9eacde1a20b627cd468c22d10bce70593412a961 /candle-examples/examples/bert
parentf291065f6cac82827a47a736ebf78e4fc9c7c569 (diff)
downloadcandle-ca479a873eeebb21cdef1e2a95d11fea742390f4.tar.gz
candle-ca479a873eeebb21cdef1e2a95d11fea742390f4.tar.bz2
candle-ca479a873eeebb21cdef1e2a95d11fea742390f4.zip
Upgrading hf-hub to `0.2.0` (Modified API to not pass the Repo around
all the time)
Diffstat (limited to 'candle-examples/examples/bert')
-rw-r--r--candle-examples/examples/bert/main.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/candle-examples/examples/bert/main.rs b/candle-examples/examples/bert/main.rs
index 6672ad09..79c78968 100644
--- a/candle-examples/examples/bert/main.rs
+++ b/candle-examples/examples/bert/main.rs
@@ -69,10 +69,11 @@ impl Args {
)
} else {
let api = Api::new()?;
+ let api = api.repo(repo);
(
- api.get(&repo, "config.json")?,
- api.get(&repo, "tokenizer.json")?,
- api.get(&repo, "model.safetensors")?,
+ api.get("config.json")?,
+ api.get("tokenizer.json")?,
+ api.get("model.safetensors")?,
)
};
let config = std::fs::read_to_string(config_filename)?;