File size: 506 Bytes
bafb458
7011484
 
 
5ae8333
7011484
bafb458
 
6926f52
bafb458
7011484
bafb458
 
 
 
 
5ae8333
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os

from huggingface_hub import HfApi, login

from .get_environments import get_environments
from .get_files import get_mp4_paths


class HuggingFaceClient:
    def __init__(self) -> None:
        login(
            token=os.environ.get("HUGGINGFACE_TOKEN"),
            add_to_git_credential=True,
            new_session=False,
        )
        self.hf_api = HfApi()
        self.environments = get_environments(self.hf_api)
        self.mp4_paths = get_mp4_paths(environments=self.environments)