Skip to content

Commit

Permalink
Add feature flag hint to README.md, fixes #1633 (#1709)
Browse files Browse the repository at this point in the history
  • Loading branch information
sftse authored Dec 30, 2024
1 parent 24d29f4 commit 555d44c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tokenizers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ use tokenizers::tokenizer::{Result, Tokenizer};
fn main() -> Result<()> {
# #[cfg(feature = "http")]
# {
let tokenizer = Tokenizer::from_pretrained("bert-base-cased", None)?;
// needs http feature enabled
let tokenizer = Tokenizer::from_pretrained("bert-base-cased", None)?;

let encoding = tokenizer.encode("Hey there!", false)?;
println!("{:?}", encoding.get_tokens());
let encoding = tokenizer.encode("Hey there!", false)?;
println!("{:?}", encoding.get_tokens());
# }
Ok(())
}
Expand Down

0 comments on commit 555d44c

Please sign in to comment.