summaryrefslogtreecommitdiff
path: root/candle-examples/examples/bert/main.rs
diff options
context:
space:
mode:
authorNicolas Patry <patry.nicolas@protonmail.com>2023-07-28 07:03:30 +0100
committerGitHub <noreply@github.com>2023-07-28 07:03:30 +0100
commit0b97987b2113b4ccbacee942b9de746ded035feb (patch)
tree9eacde1a20b627cd468c22d10bce70593412a961 /candle-examples/examples/bert/main.rs
parentf291065f6cac82827a47a736ebf78e4fc9c7c569 (diff)
parentca479a873eeebb21cdef1e2a95d11fea742390f4 (diff)
downloadcandle-0b97987b2113b4ccbacee942b9de746ded035feb.tar.gz
candle-0b97987b2113b4ccbacee942b9de746ded035feb.tar.bz2
candle-0b97987b2113b4ccbacee942b9de746ded035feb.zip
Merge pull request #261 from LaurentMazare/upgrade_hf_hub
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/main.rs')
-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)?;