nateraw / huggingface-sync-action

GitHub action that'll sync files from a GitHub Repo with the Hugging Face Hub 🤗
https://huggingface.co
Apache License 2.0
65 stars 8 forks source link

Move to use CLI commands instead of Python script #6

Open nateraw opened 4 days ago

nateraw commented 4 days ago

might be nice to move to use CLI tools from Hugging Face Hub client library that weren't around when I originally put this repo together. That way we don't have to maintain our own python logic.

Upload Folder: https://huggingface.co/docs/huggingface_hub/v0.26.2/en/guides/cli#upload-an-entire-folder

Notably it takes care of creating the repo, which is 1/2 of what the script here in the repo currently does

mrshu commented 3 days ago

@nateraw I presume this will mean installing the CLI via pip install -U "huggingface_hub[cli]" and then just calling huggingface-cli within action.yml, right?

nateraw commented 3 days ago

yes I think so. Also if you want to just solve your issue #5 and not do this, that's fine too :). Python fire, which we're using in the script, should handle list of str args so it should be very quick fix.

This one might be a little more involved, so if you don't want to sink time into it don't worry about it :)

Thanks for your help in this repo I really appreciate it!!