title | emoji | colorFrom | colorTo | sdk | pinned | app_port |
---|---|---|---|---|---|---|
Next.js + Transformers.js Server Template |
🗄️ |
blue |
purple |
docker |
false |
3000 |
This project, bootstrapped using create-next-app
, demonstrates how to use @huggingface/transformers
in Next.js.
-
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.
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.