Ë
    „;3h·	  ã                   óL   — d Z ddlmZ ddlmZ ddlmZ ddlmZ  G d„ d	«      Z	y
)zAContain helper class to retrieve/store token from/to local cache.é    )ÚPath)ÚOptionalé   )Ú	constantsé   ©Ú	get_tokenc                   óT   — e Zd Zededdfd„«       Zedee   fd„«       Zedd„«       Zy)ÚHfFolderÚtokenÚreturnNc                 ó’   — t        t        j                  «      }|j                  j	                  dd¬«       |j                  |«       y)a  
        Save token, creating folder as needed.

        Token is saved in the huggingface home folder. You can configure it by setting
        the `HF_HOME` environment variable.

        Args:
            token (`str`):
                The token to save to the [`HfFolder`]
        T)ÚparentsÚexist_okN)r   r   ÚHF_TOKEN_PATHÚparentÚmkdirÚ
write_text)Úclsr   Ú
path_tokens      ú`/var/www/html/audio-gradio/venv/lib/python3.12/site-packages/huggingface_hub/utils/_hf_folder.pyÚ
save_tokenzHfFolder.save_token   s;   € ô œ)×1Ñ1Ó2ˆ
Ø×Ñ×Ñ¨°tÐÔ<Ø×Ñ˜eÕ$ó    c                 ó   — t        «       S )aB  
        Get token or None if not existent.

        This method is deprecated in favor of [`huggingface_hub.get_token`] but is kept for backward compatibility.
        Its behavior is the same as [`huggingface_hub.get_token`].

        Returns:
            `str` or `None`: The token, `None` if it doesn't exist.
        r   ©r   s    r   r	   zHfFolder.get_token-   s   € ô ‹{Ðr   c                 ór   — 	 t        t        j                  «      j                  «        y# t        $ r Y yw xY w)zX
        Deletes the token from storage. Does not fail if token does not exist.
        N)r   r   r   ÚunlinkÚFileNotFoundErrorr   s    r   Údelete_tokenzHfFolder.delete_token<   s0   € ð
	Ü”×(Ñ(Ó)×0Ñ0Õ2øÜ ò 	Ùð	ús   ‚'* ª	6µ6)r   N)	Ú__name__Ú
__module__Ú__qualname__ÚclassmethodÚstrr   r   r	   r   © r   r   r   r      sW   „ ð ð%˜sð % tò %ó ð%ð" ð
˜( 3™-ò 
ó ð
ð òó ñr   r   N)
Ú__doc__Úpathlibr   Útypingr   Ú r   Ú_authr	   r   r%   r   r   ú<module>r+      s!   ðñ Hå Ý å Ý ÷,ò ,r   