VOOZH about

URL: https://thenewstack.io/javascript-library-lets-devs-add-ai-capabilities-to-web/

⇱ JavaScript Library Lets Devs Add AI Capabilities to Web - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2023-03-20 10:32:59
JavaScript Library Lets Devs Add AI Capabilities to Web
Data / Frontend Development / Software Development

JavaScript Library Lets Devs Add AI Capabilities to Web

Frontend developers can use AI functions such as translation and image generation on webpages with a new JavaScript library.
Mar 20th, 2023 10:32am by Loraine Lawson
👁 Featued image for: JavaScript Library Lets Devs Add AI Capabilities to Web
Feature image via Shutterstock

AI company Hugging Face has released a new open source JavaScript library that allows frontend and web developers to add machine learning capabilities to webpages and apps.

Traditionally, Python notebooks are the toolkit for data scientists, but for most web and frontend developers, it’s JavaScript. That’s why Hugging Face created its new HuggingFace.js library that will allow developers to leverage the startup’s capabilities on websites and apps.

Until now, adding those functions meant a Python app on the backend that did the work, said Jeff Boudier, head of product and growth at the startup. Using JavaScript, the browser can request machine learning models to serve predictions and obtain answers for a visitor.

“We provide some low code/no code tools, but if you want to dig in a little bit, you still have to whip out some Python notebooks, etc. And that’s the traditional toolkit of data scientists,” Boudier told The New Stack. “But for most developers out there, JavaScript is how you build applications.”

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
  • Summarization
  • 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.”

Jeremy Ellis, a developer and a STEM high school teacher, spent time working with the models to demo for his students, which is available online.

“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.

👁 A puppy on a beach

AI image courtesy Jeremy Ellis

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.”

TRENDING STORIES
Loraine Lawson is a veteran technology reporter who has covered technology issues from data integration to security for 25 years. Before joining The New Stack, she served as the editor of the banking technology site Bank Automation News. She has...
Read more from Loraine Lawson
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.