You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a few seconds, a new window should pop up on your screen!
22
+
```bash
23
+
npm run start
24
+
```
24
25
26
+
After a few seconds, a new window should pop up on your screen!
25
27
26
28
## Editing the template
27
29
28
30
All source code can be found in `./src/`:
31
+
29
32
-`index.js` - Serves as the entry point for the application's main process. When an Electron app is launched, this is the first file that gets executed, and it is responsible for setting up the main process of the application. You will need to restart the application after editing this file for your changes to take effect.
30
33
-`preload.js` - Used to preload scripts and modules in a renderer process before any other scripts run. In our case, we use the `contextBridge` API to expose the `classify` function to the renderer, which runs the model in the background. You will need to restart the application after editing this file for your changes to take effect.
31
34
-`classify.js` - Contains logic for loading the model and running predictions via the `classify` function. You will need to restart the application after editing this file for your changes to take effect.
A modern Transformers.js chat application powered by [@built-in-ai/transformers-js](https://github.com/jakobhoeg/built-in-ai) and [Vercel AI SDK](https://ai-sdk.dev/).
4
+
This app demonstrates how to use Transformers.js models with Vercel AI SDK to quickly build a fully functional chat application.
-[Shadcn/ui](https://ui.shadcn.com) for modern, accessible components
25
+
-[Zustand](https://github.com/pmndrs/zustand) for lightweight state management
26
+
-**AI Integration**:
27
+
-[Vercel AI SDK](https://ai-sdk.dev/) for chat interface and streaming
28
+
-[@built-in-ai/transformers-js](https://github.com/jakobhoeg/built-in-ai) model provider that works as a model provider for Transformers.js to integreate with Vercel AI SDK.
29
+
30
+
## Getting Started
31
+
32
+
1.**Install dependencies**:
33
+
34
+
```bash
35
+
npm install
36
+
```
37
+
38
+
2.**Run the development server**:
39
+
40
+
```bash
41
+
npm run dev
42
+
```
43
+
44
+
3.**Open your browser**:
45
+
Navigate to [http://localhost:3000](http://localhost:3000) to see the application.
46
+
47
+
## Deployment
48
+
49
+
[](https://vercel.com/new/clone?repository-url=https://github.com/huggingface/transformers.js-examples/tree/main/next-vercel-ai-sdk)
0 commit comments