is there a way to search a huggingface Repository for a specific filename?

379 Views Asked by At

I'd like to search a huggingface repository for a specific filename, without having to clone it first as it is a rather large repo with thousands of files.

I couldn't find a way to do it with the web interface, I installed the python package huggingface_hub and looked into huggingface_hub.Repository and huggingface_hub.HfFileSystem without success.

If somehow a search query isn't possible, may be retrieving the list of files?

1

There are 1 best solutions below

0
On BEST ANSWER

Sure. You can use huggingface_hub.list_files_info(repo) to get a list of file information objects for a repository; I'm using that here in my ggify project.