cheesechaser.datapool.anime_pictures

This module provides data pool implementations for anime pictures.

It defines two classes:

  1. AnimePicturesDataPool: Manages and accesses a repository of anime pictures.

  2. AnimePicturesWebpDataPool: Manages and accesses a repository of WebP-formatted anime pictures.

Both classes inherit from IncrementIDDataPool and utilize an incremental ID system for efficient data retrieval.

Note

The datasets used by these classes are gated. You must have access to the respective Hugging Face repositories before using this module:

AnimePicturesDataPool

class cheesechaser.datapool.anime_pictures.AnimePicturesDataPool(revision: str = 'main', hf_token: str | None = None)[source]

A data pool class for managing and accessing anime pictures.

This class extends the IncrementIDDataPool to provide specific functionality for handling anime picture data. It uses a predefined repository for storing and retrieving anime pictures.

Parameters:
  • revision (str) – The revision of the data to use, defaults to ‘main’.

  • hf_token (Optional[str]) – Optional Hugging Face token for authentication, defaults to None.

Usage:
>>> pool = AnimePicturesDataPool()
>>> pool = AnimePicturesDataPool(revision='main')
>>> pool = AnimePicturesDataPool(revision='main', hf_token='your_hf_token')

Note

The class uses the same repository for both data and index storage.

__init__(revision: str = 'main', hf_token: str | None = None)[source]

Initialize the AnimePicturesDataPool.

This method sets up the data pool by calling the parent class constructor with specific parameters for the anime pictures repository.

Parameters:
  • revision (str) – The revision of the data to use, defaults to ‘main’.

  • hf_token (Optional[str]) – Optional Hugging Face token for authentication, defaults to None.

AnimePicturesWebpDataPool

class cheesechaser.datapool.anime_pictures.AnimePicturesWebpDataPool(revision: str = 'main', hf_token: str | None = None)[source]

A data pool class for managing and accessing WebP-formatted anime pictures.

This class extends the IncrementIDDataPool to provide specific functionality for handling WebP-formatted anime picture data. It uses a predefined repository for storing and retrieving these pictures.

Parameters:
  • revision (str) – The revision of the data to use, defaults to ‘main’.

  • hf_token (Optional[str]) – Optional Hugging Face token for authentication, defaults to None.

Usage:
>>> pool = AnimePicturesWebpDataPool()
>>> pool = AnimePicturesWebpDataPool(revision='main')
>>> pool = AnimePicturesWebpDataPool(revision='main', hf_token='your_hf_token')

Note

The class uses the same repository for both data and index storage. The pictures in this pool are in WebP format and have a maximum size of 4 megapixels.

__init__(revision: str = 'main', hf_token: str | None = None)[source]

Initialize the AnimePicturesWebpDataPool.

This method sets up the data pool by calling the parent class constructor with specific parameters for the WebP-formatted anime pictures repository.

Parameters:
  • revision (str) – The revision of the data to use, defaults to ‘main’.

  • hf_token (Optional[str]) – Optional Hugging Face token for authentication, defaults to None.