
    RЦi                        S r SSKrSSKrSSKJrJrJr  SSKrSSKJ	r	J
r
Jr  SSKJrJr  SSKJrJrJrJrJrJrJrJrJrJrJrJrJrJr  \" \" \5      5      r\" \5      r \RB                  " S\  V s0 s H  o U _M     sn \"S	9r#\\\"   \RH                  " S
SRK                  \5       S3\" \5      S94   r&\" SS9r'\'RQ                  SSS/S9SSSSSS\RR                  SS4	S\S\S\S\\\#   \RH                  " SS94   S\S\&S\S\S\S S4S! jj5       r*\'RQ                  S"S#S$/S9   S)S%\\"\RV                  " S&S94   S'\S\&S\S S4
S( jj5       r,gs  sn f )*a  Contains commands to interact with models on the Hugging Face Hub.

Usage:
    # list models on the Hub
    hf models ls

    # list models with a search query
    hf models ls --search "llama"

    # get info about a model
    hf models info Lightricks/LTX-2
    N)	AnnotatedOptionalget_args)CLIErrorRepositoryNotFoundErrorRevisionNotFoundError)ExpandModelProperty_TModelSort_T   )	AuthorOpt	FilterOpt	FormatOptLimitOptOutputFormatQuietOptRevisionOpt	SearchOptTokenOptapi_object_to_dict
get_hf_apimake_expand_properties_parserprint_list_outputtyper_factoryModelSortEnum)typezWComma-separated properties to expand. Example: '--expand=downloads,likes,tags'. Valid: z, .)helpcallbackz Interact with models on the Hub.)r   lsz(hf models ls --sort downloads --limit 10z1hf models ls --search "llama" --author meta-llama)examples
   FsearchauthorfiltersortzSort results.limitexpandformatquiettokenreturnc	           	          [        US9n	U(       a  UR                  OSn
U	R                  X!X
XES9 Vs/ s H  n[        U5      PM     nn[	        XUS9  gs  snf )zList models on the Hub.r*   N)r$   r#   r"   r%   r&   r'   )r(   r)   )r   valuelist_modelsr   r   )r"   r#   r$   r%   r&   r'   r(   r)   r*   apisort_key
model_inforesultss                Y/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/huggingface_hub/cli/models.py	models_lsr5   G   sl    , 5
!C!tzztH //e * 

J 	:&
   gE:s   Ainfoz/hf models info meta-llama/Llama-3.2-1B-Instructz1hf models info gpt2 --expand downloads,likes,tagsmodel_idz)The model ID (e.g. `username/repo-name`).revisionc                 
   [        US9n UR                  XUS9n[        [        R                  " [        U5      S	S
95        g! [         a  n[        SU  S35      UeSnAf[         a  n[        SU SU  S35      UeSnAff = f)z"Get info about a model on the Hub.r-   )repo_idr8   r'   zModel 'z' not found.Nz
Revision 'z' not found on 'z'.   )indent)	r   r2   r   r   r   printjsondumpsr   )r7   r8   r'   r*   r0   r6   es          r4   models_inforA   h   s     5
!CS~~h&~Q
 
$**'-a
89	 # @
,78a?  SH:-=hZrJKQRRSs#   A 
BAB*A==B)NNN)-__doc__enumr>   typingr   r   r   typerhuggingface_hub.errorsr   r   r   huggingface_hub.hf_apir	   r
   
_cli_utilsr   r   r   r   r   r   r   r   r   r   r   r   r   r   sorted_EXPAND_PROPERTIES_SORT_OPTIONSEnumstrr   Optionjoin	ExpandOpt
models_clicommandtabler5   ArgumentrA   )ss   0r4   <module>rV      s;     0 0  [ [ E   $ H%:;< %		/-+H-QqD-+HsS SM	LLfgkgpgp  rD  hE  gF  FG  H./AB	  BC
 2;    	$**;;; ; /*	,	; ; ; ; ; ; 
;;4 
9;   !	:U^^1\]]^:: : 	:
 
::o ,Is   2E
