Skip to main content

llama-index readers huggingface fs integration

Project description

Hugging Face FS Loader

This loader uses Hugging Face Hub's Filesystem API (> 0.14) to load datasets.

Besides the existing load_data function, you may also choose to use load_dicts and load_df.

Usage

To use this loader, you need to pass in a path to a Hugging Face dataset.

from pathlib import Path
from llama_index import download_loader

HuggingFaceFSReader = download_loader("HuggingFaceFSReader")

# load documents
loader = HuggingFaceFSReader()
documents = loader.load_data("datasets/dair-ai/emotion/data/data.jsonl.gz")

# load dicts
dicts = loader.load_dicts("datasets/dair-ai/emotion/data/data.jsonl.gz")

# load df
df = loader.load_df("datasets/dair-ai/emotion/data/data.jsonl.gz")

This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent. See here for examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file llama_index_readers_huggingface_fs-0.1.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_huggingface_fs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bed7c06f2ad56744d1a7daff4a279c802ee2ea6c6725c8da73666f14fe168a9b
MD5 87cf5ce2286fd53a29604dbe33b781f5
BLAKE2b-256 b095e4ce2df75f7899ae8fb014539358a1bb33fea308f0a1b94dd0656514e8f3

See more details on using hashes here.

File details

Details for the file llama_index_readers_huggingface_fs-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_huggingface_fs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a932cb00c2e3ee658098a3ee11928f20c273822a9f3fdf995e8ff6d21e7c9a1d
MD5 5281142c199718361ba2fcbb9b1b6f7f
BLAKE2b-256 0f7052473ffb7dc2efe9e9a2e25ed8619c88c46fb711b6c0f5ad95e0b327f2a3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page