setfit icon indicating copy to clipboard operation
setfit copied to clipboard

Using setfit with the Hugging Face API

Open kwen1510 opened this issue 3 years ago • 3 comments

Hi, thank you so much for this amazing library!

I have trained my model and pushed it to the Hugging Face hub.

Since the output is a text-classification task, and the model card uploaded is for the sentence transformers, how should I use the model to run the classification model through the Hugging Face API?

Thank you!

kwen1510 avatar Dec 29 '22 01:12 kwen1510

Hi @kwen1510 thanks the kind words 🤗 !

We have a PR to fix the model card in #252 which will clean up some of the confusion about sentence-transformers vs setfit.

Would you mind clarifying a bit what you mean by "Hugging Face API"? Are you referring to the Inference API / widget one sees on the model page?

lewtun avatar Dec 29 '22 08:12 lewtun

To add on to Lewis' comment: If you are looking for a tutorial on how a SetFit text classificatrion model can be deployed on Hugging Face Inference Endpoints API, then I would like to point you to a great workshop that covers exactly that (among other things). See the timestamped livestream here: https://youtu.be/FKsARHV3ZTI?t=3313.

  • Tom Aarsen

tomaarsen avatar Dec 29 '22 09:12 tomaarsen

@lewtun thanks for the reply! I am referring to both the Inference API and the widget that we see on the model page.

@tomaarsen thank you for the link! I will check it out!

Happy new year to both of you!

kwen1510 avatar Jan 01 '23 07:01 kwen1510