-
Notifications
You must be signed in to change notification settings - Fork 309
Integrate SetFit library #1150
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
Merged
Merged
Integrate SetFit library #1150
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Dec 1, 2023
merveenoyan
approved these changes
Dec 1, 2023
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.
Thank you 🤗
Co-authored-by: Merve Noyan <merveenoyan@gmail.com>
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
osanseviero
approved these changes
Dec 1, 2023
osanseviero
pushed a commit
that referenced
this pull request
Dec 1, 2023
pcuenca
approved these changes
Dec 4, 2023
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.
Very nice!
Thanks @pcuenca :) Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
osanseviero
pushed a commit
to huggingface/huggingface.js
that referenced
this pull request
Dec 5, 2023
Hello! ## Pull Request overview * Integrate with the [SetFit](https://github.com/huggingface/setfit) library for Text Classification. ## Details [SetFit](https://github.com/huggingface/setfit) is a library for text classification with ~1200 models on the Hub at the time of writing. A v1.0.0 release is upcoming, and it's a good time to add this widget support, etc. It can be used like so: ```python from setfit import SetFitModel model = SetFitModel.from_pretrained("tomaarsen/span-marker-bert-base-fewnerd-fine-super") ``` ``` model.predict(["That was an awful movie"]) # => ["negative"] ``` I've previously integrated a library by only editing hub-docs and api-inference-community, but I see that there's been some refactors since. I hope that with these changes, I've edited the correct places. I also noticed this file: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/src/library-to-tasks.ts#L36, but it seems that it's automatically updated. So, I didn't touch that one. Let me know if there's any more changes needed! Related PRs: * huggingface/api-inference-community#359 * huggingface/hub-docs#1150 - Tom Aarsen
etronhatton
pushed a commit
to etronhatton/huggingface
that referenced
this pull request
May 11, 2025
Hello! ## Pull Request overview * Integrate with the [SetFit](https://github.com/huggingface/setfit) library for Text Classification. ## Details [SetFit](https://github.com/huggingface/setfit) is a library for text classification with ~1200 models on the Hub at the time of writing. A v1.0.0 release is upcoming, and it's a good time to add this widget support, etc. It can be used like so: ```python from setfit import SetFitModel model = SetFitModel.from_pretrained("tomaarsen/span-marker-bert-base-fewnerd-fine-super") ``` ``` model.predict(["That was an awful movie"]) # => ["negative"] ``` I've previously integrated a library by only editing hub-docs and api-inference-community, but I see that there's been some refactors since. I hope that with these changes, I've edited the correct places. I also noticed this file: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/src/library-to-tasks.ts#L36, but it seems that it's automatically updated. So, I didn't touch that one. Let me know if there's any more changes needed! Related PRs: * huggingface/api-inference-community#359 * huggingface/hub-docs#1150 - Tom Aarsen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
Pull Request overview
Details
SetFit is a library for text classification with ~1200 models on the Hub at the time of writing. A v1.0.0 release is upcoming, and it's a good time to add this widget support, etc. It can be used like so:
I've followed the documentation here, but it seems to be a bit outdated compared to the last time that I added an integration. It still mentions to edit
model-libraries.ts
with a snippet likeBut that type of data isn't in that file anymore. (cc: @coyotte508 ?)
Presumably I also have to update that in huggingface.js?
Note: Some of the links, e.g. https://huggingface.co/docs/setfit/reference/main#setfit.SetFitModel.predict, do not currently work, but will start working when SetFit v1.0.0 releases next week.
Related PRs: