-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Collection API #1687
Add Collection API #1687
Conversation
The documentation is not available anymore as the PR was closed or merged. |
|
||
>>> collection = create_collection(title="OS Week Highlights - Sept 18 - 24", namespace="osanseviero") | ||
>>> collection.slug | ||
"osanseviero/os-week-highlights-sept-18-24-650bfed7f795a59f491afb80" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice find :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always try to highlight some cool stuff in the docs examples 🤗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice growth hack for Omar's profile:)
cc @vwxyzjn who was wondering whether this was possible or not |
…face_hub into 1682-collections-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean implementation, a welcome addition!
Maybe we could also eventually add support for that in transformers
/diffusers
/etc or at least show in the docs how to add to a collection a fresh model uploaded using push_to_hub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nice guide! 💯
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Thank you so much for the guide review @stevhliu ! ❤️ I've addressed all of your comments which is always a great improvement to the guides 🎉 |
Server-side PRs are not all merged and tests are green ✔️. Still having a code quality error but it's been solved in #1693 ( So thanks @LysandreJik and @stevhliu for the reviews, I think we're good to merge now! 🎉 🚀 |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
Would adding a |
Yes that makes a lot of sense for usability, thanks for the suggestion @davanstrien. I opened #1695 to add it. |
Next pip install git+https://github.com/huggingface/huggingface_hub@main EDIT: it's released! https://github.com/huggingface/huggingface_hub/releases/tag/v0.18.0 |
maybe pin this as instruction in the GH issues and/or even in the README! i think many community members will be interested |
This PR adds support fpr the Collection API (implements #1682).
EDIT: PR is ready for review. Tests are still failing but a server-side change is coming (https://github.com/huggingface/moon-landing/pull/7548)
Documentation:
Create/get/update/delete collection:
get_collection
create_collection
: title, description, namespace, privateupdate_collection_metadata
: title, description, position, private, themedelete_collection
It does not include a way to list/search collections. We can do that in a later PR once it's fully supported server-side (currently only possible to list your own collections).
Add/update/remove item from collection:
add_collection_item
: item id, item type, noteupdate_collection_item
: note, positiondelete_collection_item
Usage
TODO