
    AF[i                     (    d dl Z d dlmZmZ d Zd Zy)    N)interpreter_loginwhoamic                  2   	 	 t        d      j                         j                         } | dv rdt        j                  d<   t        d       y | dv rdt        j                  d<   y t        d       n# t        t        f$ r dt        j                  d<   Y y w xY w)	Nz'Stay logged in to Hugging Face? (Y/n): )yyes falseGRADIO_AUTO_LOGOUTz/You can logout at any time with: hf auth logout)nnotruezPlease answer with 'y' or 'n')inputstriplowerosenvironprintEOFErrorKeyboardInterrupt)responses    e/var/www/html/chatbot/moweb-chatbot/venv/lib/python3.12/site-packages/gradio/cli/commands/hf_login.py
save_loginr      s    2FGMMOUUWH++3:

/0GH[(39

/056  '( 2+1

'(2s   A
A1 A1 %A1 1"BBc                     t        j                  d      r?	 t        t        j                  d            j                  d      } t	        d|  d       y 	 t               j                  d      } t	        d|  d       y # t
        $ r- t	        d       t	        d       t                t                Y y w xY w# t
        $ r" t	        d	       t                t                Y y w xY w)
NHF_TOKEN)tokennameu#   🔓  Logged in to Hugging Face as z2. You can logout at any time with: unset HF_TOKEN
u4   ❌  Error logging in to Hugging Face with $HF_TOKENzLogging in with CLI prompt...
z2. You can logout at any time with: hf auth logout
u   🔑  No Hugging Face login found, launching login prompt... 

Please use a token with permission to make calls to Inference Providers 
)r   getenvr   getr   	Exceptionr   r   )users    r   hf_loginr!      s    	yy				* 56::6BD5dV;no
	8<<'D5dV;no  	HI34L		  	 ^ L	s#   =A? (B8 ?3B54B58(C#"C#)r   huggingface_hubr   r   r   r!        r   <module>r%      s    	 52"r$   