Frontend Development Use Cases Enabled
Hugging Face has more than 150,000 open source machine learning models available on its site, but some of the use cases Hugging Face.js enables include:
- Language translations
- Sentiment analysis
- Text classification
- Object detection in images
- Text-to-image creation
“All of the use cases that today’s companies build within their applications using our models are going to be available on a webpage,” Boudier said. “All these use cases can be implemented directly on a webpage.”
“What I was able to do in a week would typically take me about four months,” Ellis shared with The New Stack via Mastodon. “They even changed their model presentation when I showed them what I was having trouble with. They changed an arrayBuffer to a blob, which made showing their text to image model much easier.”
Ellis shared an image he created using the Hugging Face tool (the hug16 entry on his demo page), which converted the text, “A high-resolution image of a puppy named lowrain playing on a beach,” to an image.
Obviously, for larger websites, leveraging these models will require more infrastructure support, Boudier explained. Inference Endpoints can be used to deploy in those situations. It allows developers to deploy machine learning models on a fully managed infrastructure.
Hugging Face.js is free to use and there’s no cost for the hub API that connects it, allowing frontend developers to play with the function for free, by leveraging an Inference Endpoint’s API. The company also welcomes community contributions to the .js library, Boudier added.
“It’s just like you would use our website directly, but you’re using it through the Hugging Face.js library when you use the Inference API,” Boudier said. “Again, there is no cost. It’s the same thing that you would do on our websites, but you’re doing it through the Hugging Face.js API.”
Open Source versus Closed Source Machine Learning Models
In addition to its products, Hugging Face supports the open source community, acting as a free repository for all types of AI models. It also offers a sandbox to explore what the models do, along with information about potential bias.
In February, the company announced a partnership with AWS to make it easier to use and train machine learning and artificial intelligence models. As part of that partnership, AWS began offering JumpStart templates that will allow web, frontend and other software developers to deploy models quickly while accessing them through an API.
One thing that makes Hugging Face’s open source options different than, say, ChatGPT or other less open AI APIs, is that developers have more information about potential biases and other details about the models, Boudier emphasized.
“That’s very important, because that means that you can understand what’s going on under the hood, you can inspect it, build upon it, etc.,” he said. “And of course, we have 150,000 Different models to do exactly what you would want to do.”