Integration with the /api/collections endpoint?
Hi,
I am currently working on a website for my org, and I was really hoping to be able to make a collection of our best models and datasets, so that they can be displayed on our landing page. However, Right now it seems that I will have to fetch the data from the collections API from a local site file. this also means that it will not be realtime, and I will have to manually update the websites files each time I want to update the site, which isn't ideal. It would be awesome if you guys could integrate the collections into the huggingface/hub.js library.
regards.
Cool idea, would be great to have support for this in the @huggingface/hub library
I'd adding a https://github.com/huggingface/huggingface.js/labels/good%20first%20issue label, anyone from the community wants to give it a try to implement it here?
Collection API is documented here BTW: https://huggingface.co/docs/hub/api#collections-api
(cc @xenova for visibility too)
As additional resource, here is how it is implemented in the Python client: https://github.com/huggingface/huggingface_hub/blob/b3e06ae2f01b30b9ff9fe391245d56b0336b048c/src/huggingface_hub/hf_api.py#L5900. Might be worth taking a look while implementing the JS counterpart :wink:
@julien-c and @Wauplin Can I work on this??
@hackpk Yes, please go ahead! Thanks for proposing to contribute on this :hugs: If you have any question about the API, please let us know. Once you have a PR to review, please ping @coyotte508 for review. Looking forward to it!
hi, @Wauplin and @coyotte508 I have worked on Sap Cds projects and do not understand much here it would be helpful if you could tell me how can I run and debug the code I have written in hub/src/lib to get the collections.
you can add a .spec.ts file next to your .ts file and do pnpm run test to run it
Hi @coyotte508 is there any solution for this error
Tried login with huggingface_hub login token but nothing.
Answered in the PR @hackpk
Hey any update on this?