huuquyet commited on
Commit
46bbc0f
β€’
1 Parent(s): 119bf38

chore: update readme

Browse files
Files changed (1) hide show
  1. README.md +35 -28
README.md CHANGED
@@ -14,28 +14,35 @@ models:
14
  short_description: Translator demo App built with Transformers.js + Tamagui
15
  ---
16
 
17
- # Translator demo App built with Transformers.js + Tamagui + Next.js
 
18
 
19
  ## πŸ”¦ About
20
 
21
- This Translator app is a starter for a Transformers.js + Tamagui + Next.js
22
 
23
  Please check out the demo site
24
- [![Open in Spaces](https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-sm-dark.svg)](https://huggingface.co/spaces/huuquyet/translator-tamagui)
25
- or [Vercel app](https://translator-tamagui.vercel.app/).
 
 
 
 
 
 
26
 
27
  ## Included models
28
 
29
- - [Xenova/nllb-200-distilled-600M](https://hf.co/Xenova/nllb-200-distilled-600M)
30
- - [vinai-translate-vi2en-v2](https://hf.co/huuquyet/vinai-translate-vi2en-v2) onnx model converted from [vinai-translate-vi2en-v2](https://hf.co/vinai/vinai-translate-vi2en-v2)
31
- - [vinai-translate-en2vi-v2](https://hf.co/huuquyet/vinai-translate-en2vi-v2) onnx model converted from [vinai-translate-en2vi-v2](https://hf.co/vinai/vinai-translate-en2vi-v2)
32
- - [envit5-translation](https://hf.co/huuquyet/envit5-translation) onnx model converted from [envit5-translation](https://hf.co/VietAI/envit5-translation)
33
 
34
  ## πŸ“¦ Included packages
35
 
36
- - Transformers.js
37
- - Tamagui πŸͺ„
38
- - Next.js
39
 
40
  ## πŸ—‚ Folder layout
41
 
@@ -45,21 +52,21 @@ The main apps are:
45
 
46
  ## 🏁 Start the app
47
 
48
- 1. Clone the repo and install dependencies:
49
 
50
- ```bash
51
- git clone https://github.com/huuquyet/translator-tamagui.git
52
- cd translator-tamagui
53
- yarn install
54
- ```
55
 
56
  2. Run the development server:
57
 
58
- ```bash
59
- yarn dev
60
- ```
61
- > Firefox users need to change the `dom.workers.modules.enabled` setting in `about:config` to `true` to enable Web Workers.
62
- > Check out [this issue](https://github.com/xenova/whisper-web/issues/8) for more details.
63
 
64
  3. Open the link (e.g., [http://localhost:3000/](http://localhost:3000/)) in your browser.
65
 
@@ -70,7 +77,7 @@ The main apps are:
70
  If you're installing a JavaScript-only dependency that will be used across platforms, install it :
71
 
72
  ```sh
73
- yarn add zustand
74
  ```
75
 
76
  ## Update new dependencies
@@ -78,16 +85,16 @@ yarn add zustand
78
  ### Pure JS dependencies
79
 
80
  ```sh
81
- yarn upgrade-interactive
82
  ```
83
 
84
  You may potentially want to have the native module transpiled for the next app. If you get error messages with `Cannot use import statement outside a module`, you may need to use `transpilePackages` in your `next.config.js` and add the module to the array there.
85
 
86
  ## Deploying to Vercel
87
 
88
- - Install vercel cli (if not): `npm i -g vercel`
89
- - Login to vercel: `vercel login`
90
- - Build command to be `vercel build` (add `--prod` if wanna build production version)
91
  - Build command: leave default setting
92
  - Output dir: leave default setting
93
- - Deploy to vercel: `vercel --prebuilt` (add `--prod` if wanna deploy to production)
 
14
  short_description: Translator demo App built with Transformers.js + Tamagui
15
  ---
16
 
17
+
18
+ # Translator App built with Transformers.js + Tamagui + Next.js
19
 
20
  ## πŸ”¦ About
21
 
22
+ This Translator app built with [πŸ€— Transformers.js](https://github.com/xenova/transformers.js) + [Tamagui](https://tamagui.dev) + [Next.js](https://nextjs.org)
23
 
24
  Please check out the demo site
25
+ <a href="https://huggingface.co/spaces/huuquyet/translator-tamagui">
26
+ <picture>
27
+ <source srcset="https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-sm.svg" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)">
28
+ <source srcset="https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-sm-dark.svg" media="(prefers-color-scheme: dark)">
29
+ <img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-sm.svg" alt="Open in Spaces">
30
+ </picture>
31
+ </a>
32
+ or [Vercel app](https://translator-tamagui.vercel.app/).
33
 
34
  ## Included models
35
 
36
+ - [NLLB200 distilled 600M](https://hf.co/facebook/nllb-200-distilled-600M) converted to [ONNX model](https://hf.co/Xenova/nllb-200-distilled-600M)
37
+ - [VinAI translate En2Vi v2](https://hf.co/vinai/vinai-translate-en2vi-v2) converted to [ONNX model](https://hf.co/huuquyet/vinai-translate-en2vi-v2)
38
+ - [VinAI translate Vi2En v2](https://hf.co/vinai/vinai-translate-vi2en-v2) converted to [ONNX model](https://hf.co/huuquyet/vinai-translate-vi2en-v2)
39
+ - [VietAI EnVi t5-translation](https://hf.co/VietAI/envit5-translation) converted to [ONNX model](https://hf.co/huuquyet/envit5-translation)
40
 
41
  ## πŸ“¦ Included packages
42
 
43
+ - [πŸ€— Transformers.js](https://github.com/xenova/transformers.js)
44
+ - [Tamagui πŸͺ„](https://tamagui.dev)
45
+ - [Next.js](https://nextjs.org)
46
 
47
  ## πŸ—‚ Folder layout
48
 
 
52
 
53
  ## 🏁 Start the app
54
 
55
+ 1. Clone the repo and install dependencies with [bun](https://bun.sh):
56
 
57
+ ```bash
58
+ git clone https://github.com/huuquyet/translator-tamagui.git
59
+ cd translator-tamagui
60
+ bun install
61
+ ```
62
 
63
  2. Run the development server:
64
 
65
+ ```bash
66
+ bun dev
67
+ ```
68
+ > Firefox users need to change the `dom.workers.modules.enabled` setting in `about:config` to `true` to enable Web Workers.
69
+ > Check out [this issue](https://github.com/xenova/whisper-web/issues/8) for more details.
70
 
71
  3. Open the link (e.g., [http://localhost:3000/](http://localhost:3000/)) in your browser.
72
 
 
77
  If you're installing a JavaScript-only dependency that will be used across platforms, install it :
78
 
79
  ```sh
80
+ bun add zustand
81
  ```
82
 
83
  ## Update new dependencies
 
85
  ### Pure JS dependencies
86
 
87
  ```sh
88
+ bun update --latest
89
  ```
90
 
91
  You may potentially want to have the native module transpiled for the next app. If you get error messages with `Cannot use import statement outside a module`, you may need to use `transpilePackages` in your `next.config.js` and add the module to the array there.
92
 
93
  ## Deploying to Vercel
94
 
95
+ - Install vercel cli (optional): `npm i -g vercel`
96
+ - Login to vercel: `bunx vercel login`
97
+ - Build command to be `bunx vercel build` (add `--prod` if wanna build production version)
98
  - Build command: leave default setting
99
  - Output dir: leave default setting
100
+ - Deploy to vercel: `bunx vercel --prebuilt` (add `--prod` if wanna deploy to production)