+
    QV-jÇ@  ã                   ó�  € ^ RI t ^ RIt^ RIHt ^ RIHtHt ^ RIHt ^ RI	H
t
 ^ RIHtHt ^ RIHt ^ RIHtHtHtHt ^R	IHtHt ]P0                  ! ]4      tR(R
 R lltR(R R lltRtR]! 4        R]! 4        R]! 4        R2tR R ltR R lt R)R R llt!]R)R R ll4       t"]RRRRRRRRR RR!RR"RR#RR$RR%R/
R& R' ll4       t#R# )*é    N©ÚPath)ÚDEFAULT_PROTOCOLÚPicklingError)ÚAny)Úversion)Ú	constantsÚsnapshot_download)ÚHfApi)ÚSoftTemporaryDirectoryÚget_fastai_versionÚget_fastcore_versionÚget_python_version)ÚloggingÚvalidate_hf_hub_argsc                ó0   € V ^8„  d   QhR\         R\         /# )é   Úfastai_min_versionÚfastcore_min_version©Ústr)Úformats   "Úm/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/huggingface_hub/fastai_utils.pyÚ__annotate__r      s   € ÷ ,
ñ ,
Üð,
äñ,
ó    c                óä  € \        4       ;'       g    \        4       R8X  d)   \        RV  RV R\        4        R\        4        R2	4      h\        P                  ! \        4       4      p\        P                  ! \        4       4      pV\        P                  ! V 4      8  d   \        RV  R\        4        R	24      hV\        P                  ! V4      8  d   \        R
V R\        4        R24      hR# )aý  
Checks that the installed fastai and fastcore versions are compatible for pickle serialization.

Args:
    fastai_min_version (`str`, *optional*):
        The minimum fastai version supported.
    fastcore_min_version (`str`, *optional*):
        The minimum fastcore version supported.

> [!TIP]
> Raises the following error:
>
>     - [`ImportError`](https://docs.python.org/3/library/exceptions.html#ImportError)
>       if the fastai or fastcore libraries are not available or are of an invalid version.
zN/Azfastai>=z and fastcore>=z' are required. Currently using fastai==z and fastcore==Ú.zD`push_to_hub_fastai` and `from_pretrained_fastai` require a fastai>=z+ version, but you are using fastai version zA which is incompatible. Upgrade with `pip install fastai==2.5.6`.zF`push_to_hub_fastai` and `from_pretrained_fastai` require a fastcore>=ú- version, but you are using fastcore version zD which is incompatible. Upgrade with `pip install fastcore==1.3.27`.N)r   r   ÚImportErrorr   ÚVersion)r   r   Úcurrent_fastai_versionÚcurrent_fastcore_versions   &&  r   Ú_check_fastai_fastcore_versionsr#      s  € ô( 	Ó×6Ð6Ô"4Ó"6¸5Ô@ÜØÐ)Ð*¨/Ð:NÐ9Oð P2Ü2DÓ2FÐ1Gð HÜ.Ó0Ð1°ð4ó
ð 	
ô %Ÿ_š_Ô-?Ó-AÓBÐÜ&ŸšÔ/CÓ/EÓFÐà¤§¢Ð0BÓ CÔCÜðØ*Ð+ð ,Ü"Ó$Ð%ð &ðó
ð 	
ð  ¤'§/¢/Ð2FÓ"GÔGÜðØ.Ð/ð 0Ü,Ó.Ð/ð 0/ð/ó
ð 	
ñ Hr   c                ó<   € V ^8„  d   QhR\         R\         R\         /# )r   Ústorage_folderr   r   r   )r   s   "r   r   r   G   s+   € ÷ \ñ \Üð\äð\ô ñ\r   c                óÔ  €  ^ RI p\        P                  P                  T  R24      '       g   \        P                  R4       R# TP                  T  R24      pRTP                  4       9  d   \        P                  R4       R# TR,          pRTP                  4       9  d   \        P                  R4       R# TR,          pT Uu. uF  qwP                  R	4      '       g   K  TNK  	  pp\        T4      ^ 8X  d   \        P                  R
4       Mp\        T^ ,          4      P                  R4      ^,          p	T	R8w  dB   \        P                  ! T	4      \        P                  ! T4      8  d   \        RT RT	 R24      hT Uu. uF  qwP                  R4      '       g   K  TNK  	  p
p\        T
4      ^ 8X  d   \        P                  R4       R# \        T
^ ,          4      P                  R4      ^,          pTR8w  dD   \        P                  ! T4      \        P                  ! T4      8  d   \        RT RT R24      hR# R#   \         d    \        R4      hi ; iu upi u upi )a¨  
Checks that the `pyproject.toml` file in the directory `storage_folder` has fastai and fastcore versions
that are compatible with `from_pretrained_fastai` and `push_to_hub_fastai`. If `pyproject.toml` does not exist
or does not contain versions for fastai and fastcore, then it logs a warning.

Args:
    storage_folder (`str`):
        Folder to look for the `pyproject.toml` file.
    fastai_min_version (`str`, *optional*):
        The minimum fastai version supported.
    fastcore_min_version (`str`, *optional*):
        The minimum fastcore version supported.

> [!TIP]
> Raises the following errors:
>
>     - [`ImportError`](https://docs.python.org/3/library/exceptions.html#ImportError)
>       if the `toml` module is not installed.
>     - [`ImportError`](https://docs.python.org/3/library/exceptions.html#ImportError)
>       if the `pyproject.toml` indicates a lower than minimum supported version of fastai or fastcore.
Nzn`push_to_hub_fastai` and `from_pretrained_fastai` require the toml module. Install it with `pip install toml`.z/pyproject.tomlzàThere is no `pyproject.toml` in the repository that contains the fastai `Learner`. The `pyproject.toml` would allow us to verify that your fastai and fastcore versions are compatible with those of the model you want to load.zbuild-systemzúThere is no `build-system` section in the pyproject.toml of the repository that contains the fastai `Learner`. The `build-system` would allow us to verify that your fastai and fastcore versions are compatible with those of the model you want to load.ÚrequireszòThere is no `requires` section in the pyproject.toml of the repository that contains the fastai `Learner`. The `requires` would allow us to verify that your fastai and fastcore versions are compatible with those of the model you want to load.ÚfastaizPThe repository does not have a fastai version specified in the `pyproject.toml`.Ú=Ú z*`from_pretrained_fastai` requires fastai>=z$ version but the model to load uses z which is incompatible.ÚfastcorezRThe repository does not have a fastcore version specified in the `pyproject.toml`.z,`from_pretrained_fastai` requires fastcore>=r   )ÚtomlÚModuleNotFoundErrorr   ÚosÚpathÚisfileÚloggerÚwarningÚloadÚkeysÚ
startswithÚlenr   Ú	partitionr   r    )r%   r   r   r,   Úpyproject_tomlÚbuild_system_tomlÚpackage_versionsÚpckÚfastai_packagesÚfastai_versionÚfastcore_packagesÚfastcore_versions   &&&         r   Ú)_check_fastai_fastcore_pyproject_versionsr@   G   sM  € ð6
Ûô �7‰7�>‰>˜^Ð,¨OÐ<×=Ò=Ü�‰ðô	
ñ 	Ø—Y‘Y .Ð!1°ÐAÓB€Nà˜^×0Ñ0Ó2Ô2Ü�‰ð.ô	
ñ 	Ø& ~Õ6ÐàÐ*×/Ñ/Ó1Ô1Ü�‰ð.ô	
ñ 	Ø(¨Õ4Ðñ '7ÓSÑ&6˜s¿.¹.È×:R—s�sÑ&6€OÐSÜ
ˆ?Ó˜qÔ Ü�‰ÐiÕjô ˜_¨QÕ/Ó0×:Ñ:¸3Ó?ÀÕBˆØ˜RÔ¤G§O¢O°NÓ$CÄgÇoÂoÐVhÓFiÔ$iÜðØ.Ð/ð 0Ø"Ð#Ð#:ð<óð ñ )9ÓWÑ(8 ¿N¹NÈ:×<VŸ˜Ñ(8ÐÐWÜ
ÐÓ Ô"Ü�‰ÐkÖlô Ð0°Õ3Ó4×>Ñ>¸sÓCÀAÕFÐØ˜rÔ!¤g§o¢oÐ6FÓ&GÌ'Ï/Ê/ÐZnÓJoÔ&oÜðØ2Ð3ð 4Ø,Ð-Ð-DðFóð ñ 'pÑ!øôu ô 
Üð3ó
ð 	
ð
üòN Tùò Xs#   ‚I ÃI Ã$I ÆI%Æ#I%ÉIu   ---
tags:
- fastai
---

# Amazing!

ðŸ¥³ Congratulations on hosting your fastai model on the Hugging Face Hub!

# Some next steps
1. Fill out this model card with more information (see the template below and the [documentation here](https://huggingface.co/docs/hub/model-repos))!

2. Create a demo in Gradio or Streamlit using ðŸ¤— Spaces ([documentation here](https://huggingface.co/docs/hub/spaces)).

3. Join the fastai community on the [Fastai Discord](https://discord.com/invite/YKrxeNn)!

Greetings fellow fastlearner ðŸ¤�! Don't forget to delete this content from your model card.


---


# Model card

## Model description
More information needed

## Intended uses & limitations
More information needed

## Training and evaluation data
More information needed
zB[build-system]
requires = ["setuptools>=40.8.0", "wheel", "python=z", "fastai=z", "fastcore=z6"]
build-backend = "setuptools.build_meta:__legacy__"
c                ó$   € V ^8„  d   QhR\         /# ©r   Úrepo_dirr   )r   s   "r   r   r   Î   s   € ÷ %ñ %¤ñ %r   c                óâ   € V R,          pVP                  4       '       g<   VP                  RRR7      ;_uu_ 4       pVP                  \        4       RRR4       R# R#   + '       g   i     R# ; i)zw
Creates a model card for the repository.

Args:
    repo_dir (`Path`):
        Directory where model card is created.
z	README.mdÚwúutf-8©ÚencodingN)ÚexistsÚopenÚwriteÚREADME_TEMPLATE)rC   Úreadme_pathÚfs   &  r   Ú_create_model_cardrO   Î   sX   € ð ˜[Õ(€Kà×Ñ×ÒØ×Ñ˜c¨GÐ×4Ô4¸Ø�G‰G”OÔ$÷ 5Ñ4ñ  ß4×4Ð4úó   »AÁA.	c                ó$   € V ^8„  d   QhR\         /# rB   r   )r   s   "r   r   r   Ý   s   € ÷ (ñ (¤dñ (r   c                óâ   € V R,          pVP                  4       '       g<   VP                  RRR7      ;_uu_ 4       pVP                  \        4       RRR4       R# R#   + '       g   i     R# ; i)zƒ
Creates a `pyproject.toml` for the repository.

Args:
    repo_dir (`Path`):
        Directory where `pyproject.toml` is created.
zpyproject.tomlrE   rF   rG   N)rI   rJ   rK   ÚPYPROJECT_TEMPLATE)rC   Úpyproject_pathrN   s   &  r   Ú_create_model_pyprojectrU   Ý   sZ   € ð Ð 0Õ0€Nà× Ñ ×"Ò"Ø× Ñ  ¨wÐ ×7Ô7¸1Ø�G‰GÔ&Ô'÷ 8Ñ7ñ #ß7×7Ð7úrP   c                óv   € V ^8„  d   QhR\         \        ,          R\        \         \        3,          R,          /# )r   Úsave_directoryÚconfigN)r   r   Údictr   )r   s   "r   r   r   ì   s/   € ÷ 2
ñ 2
äœ$•Jð2
ô ””c��N˜TÕ!ñ2
r   c                óš  € \        4        \        P                  ! VRR7       Ve�   \        V\        4      '       g   \        R\        V4       R24      h\        P                  P                  V\        P                  4      p\        VR4      ;_uu_ 4       p\        P                  ! W$4       RRR4       \        \        V4      4       \!        \        V4      4       \        V4      V n        \        P                  ! VRR7        V P#                  R\$        R7       R#   + '       g   i     Lz; i  \&         d    \'        R	4      hi ; i)
aÂ  
Saves a fastai learner to `save_directory` in pickle format using the default pickle protocol for the version of python used.

Args:
    learner (`Learner`):
        The `fastai.Learner` you'd like to save.
    save_directory (`str` or `Path`):
        Specific directory in which you want to save the fastai learner.
    config (`dict`, *optional*):
        Configuration object. Will be uploaded as a .json file. Example: 'https://huggingface.co/espejelomar/fastai-pet-breeds-classification/blob/main/config.json'.

> [!TIP]
> Raises the following error:
>
>     - [`RuntimeError`](https://docs.python.org/3/library/exceptions.html#RuntimeError)
>       if the config file provided is not a dictionary.
T)Úexist_okNz(Provided config should be a dict. Got: 'Ú'rE   ú	model.pkl)ÚfnameÚpickle_protocolzÀYou are using a lambda function, i.e., an anonymous function. `pickle` cannot pickle function objects and requires that all functions have names. One possible solution is to name the function.)r#   r.   ÚmakedirsÚ
isinstancerY   ÚRuntimeErrorÚtyper/   Újoinr	   ÚCONFIG_NAMErJ   ÚjsonÚdumprO   r   rU   Úexportr   r   )ÚlearnerrW   rX   r/   rN   s   &&&  r   Ú_save_pretrained_fastairj   ì   sþ   € ô, $Ô%ä‡K‚K�¨Õ.ð ÒÜ˜&¤$×'Ò'ÜÐ!IÌ$ÈvË,ÈÐWXÐYÓZÐZÜ�w‰w�|‰|˜N¬I×,AÑ,AÓBˆÜ�$˜�_Œ_ Ü�IŠI�fÔ ÷ ô ”t˜NÓ+Ô,ÜœD Ó0Ô1ô ˜Ó'€G„LÜ‡K‚K�¨Õ.ð

Ø�‰ØÜ,ð 	ö 	
÷ �_ûô ô 
ÜðEó
ð 	
ð
ús   ÂD ÄD3 Ä D0	Ä3E
c                ó>   € V ^8„  d   QhR\         R\         R,          /# )r   Úrepo_idÚrevisionNr   )r   s   "r   r   r   "  s$   € ÷ )Cñ )CÜð)Cä�D�jñ)Cr   c                ó  € \        4        \        P                  P                  V 4      '       g   \	        V VR\        4       R7      pMT p\        V4       ^ RIHp V! \        P                  P                  VR4      4      # )a4  
Load pretrained fastai model from the Hub or from a local directory.

Args:
    repo_id (`str`):
        The location where the pickled fastai.Learner is. It can be either of the two:
            - Hosted on the Hugging Face Hub. E.g.: 'espejelomar/fatai-pet-breeds-classification' or 'distilgpt2'.
              You can add a `revision` by appending `@` at the end of `repo_id`. E.g.: `dbmdz/bert-base-german-cased@main`.
              Revision is the specific model version to use. Since we use a git-based system for storing models and other
              artifacts on the Hugging Face Hub, it can be a branch name, a tag name, or a commit id.
            - Hosted locally. `repo_id` would be a directory containing the pickle and a pyproject.toml
              indicating the fastai and fastcore versions used to build the `fastai.Learner`. E.g.: `./my_model_directory/`.
    revision (`str`, *optional*):
        Revision at which the repo's files are downloaded. See documentation of `snapshot_download`.

Returns:
    The `fastai.Learner` model in the `repo_id` repo.
r(   )rl   rm   Úlibrary_nameÚlibrary_version)Úload_learnerr]   )
r#   r.   r/   Úisdirr
   r   r@   Úfastai.learnerrq   rd   )rl   rm   r%   rq   s   &&  r   Úfrom_pretrained_fastairt   !  sd   € ô. $Ô%ô
 �7‰7�=‰=˜×!Ò!Ü*ØØØ!Ü.Ó0ô	
‰ð !ˆä-¨nÔ=å+áœŸ™Ÿ™ ^°[ÓAÓBÐBr   Úcommit_messagez(Push FastAI model using huggingface_hub.ÚprivateÚtokenrX   ÚbranchÚ	create_prÚallow_patternsÚignore_patternsÚdelete_patternsÚapi_endpointc                óž  € V ^8„  d   QhR\         R\         R\        R,          R\         R,          R\        R,          R\         R,          R\        R,          R	\        \         ,          \         ,          R,          R
\        \         ,          \         ,          R,          R\        \         ,          \         ,          R,          R\         R,          /# )r   rl   ru   rv   Nrw   rX   rx   ry   rz   r{   r|   r}   )r   ÚboolrY   Úlist)r   s   "r   r   r   O  sÆ   € ÷ O
ñ O
ô ðO
ô ð	O
ô
 �D�[ðO
ô ��:ðO
ô �4�KðO
ô �$�JðO
ô �d�{ðO
ô œ•I¤•O dÕ*ðO
ô œ#•Y¤•_ tÕ+ðO
ô œ#•Y¤•_ tÕ+ðO
ô ˜•*ñO
r   c               ó>  € \        4        \        VR7      pVP                  WVRR7      P                  p\	        4       ;_uu_ 4       p\        V4      V,          p\        WVR7       VP                  VVVVVVVV	V
R7	      uuRRR4       #   + '       g   i     R# ; i)a	  
Upload learner checkpoint files to the Hub.

Use `allow_patterns` and `ignore_patterns` to precisely filter which files should be pushed to the hub. Use
`delete_patterns` to delete existing remote files in the same commit. See [`upload_folder`] reference for more
details.

Args:
    learner (`Learner`):
        The `fastai.Learner' you'd like to push to the Hub.
    repo_id (`str`):
        The repository id for your model in Hub in the format of "namespace/repo_name". The namespace can be your individual account or an organization to which you have write access (for example, 'stanfordnlp/stanza-de').
    commit_message (`str`, *optional*):
        Message to commit while pushing. Will default to :obj:`"add model"`.
    private (`bool`, *optional*):
        Whether or not the repository created should be private.
        If `None` (default), will default to been public except if the organization's default is private.
    token (`str`, *optional*):
        The Hugging Face account token to use as HTTP bearer authorization for remote files. If :obj:`None`, the token will be asked by a prompt.
    config (`dict`, *optional*):
        Configuration object to be saved alongside the model weights.
    branch (`str`, *optional*):
        The git branch on which to push the model. This defaults to
        the default branch as specified in your repository, which
        defaults to `"main"`.
    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request from `branch` with that commit.
        Defaults to `False`.
    api_endpoint (`str`, *optional*):
        The API endpoint to use when pushing the model to the hub.
    allow_patterns (`list[str]` or `str`, *optional*):
        If provided, only files matching at least one pattern are pushed.
    ignore_patterns (`list[str]` or `str`, *optional*):
        If provided, files matching any of the patterns are not pushed.
    delete_patterns (`list[str]` or `str`, *optional*):
        If provided, remote files matching any of the patterns will be deleted from the repo.

Returns:
    The url of the commit of your model in the given repository.

> [!TIP]
> Raises the following error:
>
>     - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
>       if the user is not log on to the Hugging Face Hub.
)ÚendpointT)rl   rw   rv   r[   )rX   )	rl   rw   Úfolder_pathru   rm   ry   rz   r{   r|   N)r#   r   Úcreate_reporl   r   r   rj   Úupload_folder)ri   rl   ru   rv   rw   rX   rx   ry   rz   r{   r|   r}   ÚapiÚtmpÚ
saved_paths   &$$$$$$$$$$$   r   Úpush_to_hub_fastair‰   N  s’   € ô| $Ô%Ü
˜Ô
&€CØ�o‰o gÀGÐVZˆoÓ[×cÑc€Gô 
 ×	!Ô	! SÜ˜#“Y Õ(ˆ
Ü ¸FÕCØ× Ñ ØØØ"Ø)ØØØ)Ø+Ø+ð !ó 

÷ 
"×	!×	!Ó	!ús   Á9BÂB	)z2.4z1.3.27)N)$rf   r.   Úpathlibr   Úpickler   r   Útypingr   Ú	packagingr   Úhuggingface_hubr	   r
   Úhuggingface_hub.hf_apir   Úhuggingface_hub.utilsr   r   r   r   Úutilsr   r   Ú
get_loggerÚ__name__r1   r#   r@   rL   rS   rO   rU   rj   rt   r‰   © r   r   Ú<module>r•      s>  ðÛ Û 	Ý ß 2Ý å ç 8Ý (÷ó ÷ 1ð 
×	Ò	˜HÓ	%€÷,
÷^\ð~ €ðD4Ù4FÓ4HÐ3IÈÑUgÓUiÐTjÐjwñ  yMó  yOð  xPð PðÐ õ%õ(÷2
ðj ö)Có ð)CðX ðO
ð Eð	O
ð
  ðO
ð ðO
ð ðO
ð ðO
ð "ðO
ð .2ðO
ð /3ðO
ð /3ðO
ð  $öO
ó òO
r   