HfGated

Read files from Hugging Face datasets: gated/private with a token, public without one. Parquet goes straight into Explorer.DataFrame.

Quick start

Gated dataset (a read token is required):

Mix.install([{:hf_gated, "~> 0.1"}])
df = HfGated.fetch!("user/dataset", "latest.parquet", token: token)

Public dataset (no token needed):

docs = HfGated.fetch_file!("user/public-dataset", "docs.md")

Functions

The token is passed only through arguments; the library never stores it. Gated datasets without a token return :unauthorized.

Installation

Add to your dependencies:

{:hf_gated, "~> 0.1"}

or in Livebook:

Mix.install([{:hf_gated, "~> 0.1"}])

License

MIT - see LICENSE.