JavaScript Libraries Enable Developers to Add AI Capabilities to the Web

AI Basics


AI company Hugging Face has released a new open source JavaScript library that enables front-end and web developers to add machine learning capabilities to web pages and apps.

Traditionally, Python notebooks are toolkits for data scientists, but JavaScript for most web and front-end developers. That’s why Hugging Face created the new HuggingFace.js library to help developers leverage Startup’s functionality in her websites and apps.

Adding these features has historically meant working Python apps on the back end, said Jeff Boudier, head of product and growth at the startup. Using JavaScript, browsers can request machine learning models to provide predictions and get answers for visitors.

“We provide some low-code/no-code tools, but if you want to dig a little deeper, you have to write a Python notebook or something like that. It’s a traditional data scientist toolkit,” says Boudier. he told The New Stack. “But for most developers out there, JavaScript is how applications are built.”

Enables front-end development use cases

With over 150,000 open source machine learning models on the Hugging Face site, use cases enabled by Hugging Face.js include:

  • language translation
  • sentiment analysis
  • wrap up
  • text classification
  • Object detection in images
  • Text-to-image creation

“All the use cases that companies today use our models to build within their own applications will be available on web pages,” said Boudier. “All of these use cases can be implemented directly in web pages.”

Jeremy Ellis, a developer and STEM high school teacher, spent some time working on student demo models available online.

“What I can do in a week usually takes about four months,” Ellis shared to The New Stack via Mastodon. “They even changed the presentation of the model when I showed them my problem. Changing the arrayBuffer to a blob made it much easier to display the model from text to image.”

Ellis shared an image created using the Hugging Face tool (the hug16 entry on his demo page). This tool converted the text ‘He is a high resolution image of a puppy named lowrain playing on the beach’ into an image.

beach puppies

AI Image Credit: Jeremy Ellis

Obviously, larger websites will need more infrastructure support to take advantage of these models, Boudier explains. In those situations, you can deploy using an inference endpoint. It allows developers to deploy machine learning models on a fully managed infrastructure.

Hugging Face.js is free to use, and the hub API that connects it is free, so front-end developers can leverage the inference endpoint APIs and experiment with features for free. The company also welcomes community contributions to the .js library, he added.

“It’s like using our website directly, but if you use the Inference API, you’re using it through the Hugging Face.js library,” says Boudier. “Again, no cost. This is the same thing we do on our website, but through the Hugging Face.js API.”

Open and closed source machine learning models

In addition to products, Hugging Face supports the open source community and acts as a free repository for all kinds of AI models. It also provides a sandbox for exploring model functionality, along with information on potential biases.

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 has launched JumpStart templates that enable web, front-end, and other software developers to rapidly deploy models while accessing them through APIs.

One of the things that makes Hugging Face’s open source option different from ChatGPT and other less open AI APIs is that the developer has more information about potential biases and other details about the model. emphasized Boudier.

“This is very important because it means you can understand what’s going on under the hood, and you can look at it or build on it,” he said. “And of course, with 150,000 different models, you can do exactly what you want.”

group Created by sketch.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *