summaryrefslogtreecommitdiff
path: root/candle-examples/examples/falcon/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'candle-examples/examples/falcon/main.rs')
-rw-r--r--candle-examples/examples/falcon/main.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/candle-examples/examples/falcon/main.rs b/candle-examples/examples/falcon/main.rs
index 3a284c86..a01191a5 100644
--- a/candle-examples/examples/falcon/main.rs
+++ b/candle-examples/examples/falcon/main.rs
@@ -123,14 +123,18 @@ fn main() -> Result<()> {
let device = candle_examples::device(args.cpu)?;
let start = std::time::Instant::now();
let api = Api::new()?;
- let repo = Repo::with_revision(args.model_id, RepoType::Model, args.revision);
- let tokenizer_filename = api.get(&repo, "tokenizer.json")?;
+ let repo = api.repo(Repo::with_revision(
+ args.model_id,
+ RepoType::Model,
+ args.revision,
+ ));
+ let tokenizer_filename = repo.get("tokenizer.json")?;
let mut filenames = vec![];
for rfilename in [
"model-00001-of-00002.safetensors",
"model-00002-of-00002.safetensors",
] {
- let filename = api.get(&repo, rfilename)?;
+ let filename = repo.get(rfilename)?;
filenames.push(filename);
}
println!("retrieved the files in {:?}", start.elapsed());