metadata
title: Next.js + Transformers.js Server Template
emoji: 🗄️
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
app_port: 3000
next-server
This project, bootstrapped using create-next-app
, demonstrates how to use @huggingface/transformers
in Next.js.
Instructions
Clone the repository:
git clone https://github.com/huggingface/transformers.js-examples.git
Change directory to the
next-server
project:cd transformers.js-examples/next-server
Install the dependencies:
npm install
Run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying
app/page.js
(Next.js) andapp/api/classify/route.js
(Transformers.js). The page auto-updates as you edit the file.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.