[그 외] 허깅페이스에서 repo 내 Files에서 single file 다운 받기

2023. 5. 29. 16:24AI/그 외

from huggingface_hub import hf_hub_download
hf_hub_download(repo_id="lysandre/arxiv-nlp", filename="config.json")

hf_hub_download(repo_id="google/fleurs", filename="fleurs.py", repo_type="dataset")

https://huggingface.co/docs/huggingface_hub/guides/download 

 

Download files from the Hub

The huggingface_hub library provides functions to download files from the repositories stored on the Hub. You can use these functions independently or integrate them into your own library, making it more convenient for your users to interact with the Hub.

huggingface.co

 

'AI > 그 외' 카테고리의 다른 글

[그 외] pytorch, random 난수고정  (0) 2023.06.06
[그 외] huggingface mt5 오류  (0) 2023.05.19
[그 외] Huggingface Trainer의 Early Stopping  (0) 2023.05.08