o
    eF                  	   @   s  d dl Z d dlZd dlZd dlmZ dZi ddgdg ddd	d
gddgdg dddgdg ddddgdg ddg ddg ddg ddg dd g d!d"d#d$gd%d&d'gd(d)gd*gg d+g d,g d-d.gg d/d0d1gd2ZdDd3d4Zeeg ed5\Z	Z
ZerCd6d7lmZ d6dlmZmZmZmZ d6d8lmZmZ d6d9lmZ d6dlmZmZmZmZmZ d6d:lmZ d6dl m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z) d6d;l*m+Z+m,Z, d6dl-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4 d6dl5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z? d6dl@mAZAmBZBmCZC d6d<lDmEZEmFZFmGZGmHZHmIZImJZJmKZK d6dlLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZemfZfmgZgmhZhmiZimjZjmkZkmlZlmmZmmnZnmoZompZpmqZqmrZrmsZsmtZtmuZumvZvmwZwmxZxmyZymzZzm{Z{m|Z|m}Z}m~Z~mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ d6d!lmZmZmZ d6d=lmZmZ d6d>lmZmZ d6d?lmZ d6d@lmZ d6d+lmZmZmZmZ d6d,lmZmZmZmZmZmZmZmZ d6d-lmZmZmZmZmZ d6dAlmZ d6dBlmZmZmZmZmZmZmZmZmZmZmZmZmZmZ d6dClmZmZ dS dS )E    N)TYPE_CHECKINGz0.17.1_commit_schedulerCommitScheduler_login)interpreter_loginloginlogoutnotebook_login_multi_commitsMultiCommitExceptionplan_multi_commits_snapshot_downloadsnapshot_download
_space_api)SpaceHardwareSpaceRuntime
SpaceStageSpaceStorageSpaceVariable_tensorboard_loggerHFSummaryWriter_webhooks_payload)	WebhookPayloadWebhookPayloadCommentWebhookPayloadDiscussionWebhookPayloadDiscussionChangesWebhookPayloadEventWebhookPayloadMovedToWebhookPayloadRepoWebhookPayloadUrlWebhookPayloadWebhook_webhooks_serverWebhooksServerwebhook_endpoint	community)
DiscussionDiscussionCommentDiscussionCommitDiscussionEventDiscussionStatusChangeDiscussionTitleChangeDiscussionWithDetails	constants)
CONFIG_NAMEFLAX_WEIGHTS_NAMEHUGGINGFACE_CO_URL_HOMEHUGGINGFACE_CO_URL_TEMPLATEPYTORCH_WEIGHTS_NAMEREPO_TYPE_DATASETREPO_TYPE_MODELREPO_TYPE_SPACETF2_WEIGHTS_NAMETF_WEIGHTS_NAMEfastai_utils)_save_pretrained_fastaifrom_pretrained_fastaipush_to_hub_fastaifile_download)HfFileMetadata_CACHED_NO_EXISTcached_downloadget_hf_file_metadatahf_hub_download
hf_hub_urltry_to_load_from_cachehf_api)J
CommitInfoCommitOperationCommitOperationAddCommitOperationCopyCommitOperationDeleteDatasetSearchArgumentsGitCommitInfo
GitRefInfoGitRefsHfApiModelSearchArgumentsRepoUrl	UserLikesadd_space_secretadd_space_variablechange_discussion_statuscomment_discussioncreate_branchcreate_commitcreate_commits_on_prcreate_discussioncreate_pull_requestcreate_repo
create_tagdataset_infodelete_branchdelete_filedelete_folderdelete_repodelete_space_secretdelete_space_storagedelete_space_variable
delete_tagduplicate_spaceedit_discussion_commentfile_existsget_dataset_tagsget_discussion_detailsget_full_repo_nameget_model_tagsget_repo_discussionsget_space_runtimeget_space_variablesget_token_permissionlikelist_datasetslist_files_infolist_liked_reposlist_metricslist_modelslist_repo_commitslist_repo_fileslist_repo_refslist_spacesmerge_pull_request
model_info	move_repopause_spacerename_discussionrepo_exists	repo_inforepo_type_and_id_from_hf_idrequest_space_hardwarerequest_space_storagerestart_spacerun_as_futureset_space_sleep_time
space_infosuper_squash_historyunlikeupdate_repo_visibilityupload_fileupload_folderwhoamihf_file_system)HfFileSystemHfFileSystemFileHfFileSystemResolvedPath	hub_mixinModelHubMixinPyTorchModelHubMixinzinference._clientInferenceClientInferenceTimeoutErrorz"inference._generated._async_clientAsyncInferenceClientInferenceApi)KerasModelHubMixinfrom_pretrained_keraspush_to_hub_kerassave_pretrained_keras)DatasetCard	ModelCardRepoCard	SpaceCardmetadata_eval_resultmetadata_loadmetadata_savemetadata_update)CardDataDatasetCardData
EvalResultModelCardDataSpaceCardData
Repository)CacheNotFoundCachedFileInfoCachedRepoInfoCachedRevisionInfoCorruptedCacheExceptionDeleteCacheStrategyHFCacheInfoHfFoldercached_assets_pathconfigure_http_backenddump_environment_infoget_sessionloggingscan_cache_dirDatasetFilterModelFilter)inference_apikeras_mixinrepocardrepocard_data
repositoryutilszutils.endpoint_helpersc                    s   |du ri }du rt  nt dd | D t B  fdd} fdd}tjdd	rGt  B D ]}|| q@||t fS )
a[  Attach lazily loaded submodules, functions, or other attributes.

    Typically, modules import submodules and attributes as follows:

    ```py
    import mysubmodule
    import anothersubmodule

    from .foo import someattr
    ```

    The idea is to replace a package's `__getattr__`, `__dir__`, and
    `__all__`, such that all imports work exactly the way they would
    with normal imports, except that the import occurs upon first use.

    The typical way to call this function, replacing the above imports, is:

    ```python
    __getattr__, __dir__, __all__ = lazy.attach(
        __name__,
        ['mysubmodule', 'anothersubmodule'],
        {'foo': ['someattr']}
    )
    ```
    This functionality requires Python 3.7 or higher.

    Args:
        package_name (`str`):
            Typically use `__name__`.
        submodules (`set`):
            List of submodules to attach.
        submod_attrs (`dict`):
            Dictionary of submodule -> list of attributes / functions.
            These attributes are imported as they are used.

    Returns:
        __getattr__, __dir__, __all__

    Nc                 S   s    i | ]\}}|D ]}||qqS  r   ).0modattrsattrr   r   HD:\Projects\ConvertPro\env\Lib\site-packages\huggingface_hub/__init__.py
<dictcomp>C  s     z_attach.<locals>.<dictcomp>c                    s   | v rt  d|  S |  v r7 d |   }t |}t|| }|  |  kr5tj }||j| < |S td d|  )N.zNo z attribute )	importlibimport_modulegetattrsysmodules__dict__AttributeError)nameZsubmod_pathZsubmodr   pkg)attr_to_modulespackage_name
submodulesr   r   __getattr__G  s   



z_attach.<locals>.__getattr__c                      s    S )Nr   r   )__all__r   r   __dir__Z  s   z_attach.<locals>.__dir__ZEAGER_IMPORT )setitemslistkeysosenvironget)r   r   submod_attrsr   r   r   r   )r   r   r   r   r   _attach  s   (
r   )r   r      )r   )r   r   )r   )r   )r"   r#   )r=   r<   r>   r?   r@   rA   rB   )r   r   )r   r   )r   )r   )r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   )NN)r   r   r   typingr   __version__Z_SUBMOD_ATTRSr   __name__r   r   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r=   r<   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Zinference._clientr   r   Z"inference._generated._async_clientr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Zutils.endpoint_helpersr   r   r   r   r   r   <module>   s   *
&*3?DM     #  '  +
  
^Q,$0	$	2 L(
@ 