export const EXAMPLES = [ { key: "wikipedia", label: "Wikipedia", file: "examples/wikipedia-bpe.txt", source: { name: "Byte-pair encoding, English Wikipedia", url: "https://en.wikipedia.org/wiki/Byte-pair_encoding", license: "CC BY-SA 4.0" }, }, { key: "code", label: "Code", file: "examples/transformers-modeling-llama.py", source: { name: "huggingface/transformers, modeling_llama.py", url: "https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/modeling_llama.py", license: "Apache-2.0" }, }, { key: "readme", label: "README", file: "examples/tokenizers-readme.md", source: { name: "huggingface/tokenizers, README.md", url: "https://github.com/huggingface/tokenizers/blob/main/README.md", license: "Apache-2.0" }, }, { key: "languages", label: "10 languages", file: "examples/wikipedia-llm-10-languages.txt", source: { name: "Large language model, the intro in ten Wikipedias", url: "https://www.wikidata.org/wiki/Q115305900#sitelinks-wikipedia", license: "CC BY-SA 4.0" }, }, { key: "novel", label: "Novel chapter", file: "examples/alice-chapter-1.txt", source: { name: "Alice's Adventures in Wonderland, chapter I, Project Gutenberg", url: "https://www.gutenberg.org/ebooks/11", license: "public domain" }, }, ]; export function loadExample(example) { return fetch(example.file).then((response) => response.text()); }