huuquyet commited on
Commit
7ec841e
Β·
verified Β·
1 Parent(s): bd650ac

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +68 -2
README.md CHANGED
@@ -10,7 +10,73 @@ models:
10
  - Xenova/nllb-200-distilled-600M
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
14
 
 
15
 
16
- # Translator App built with Transformers.js + Tamagui + Next.js
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  - Xenova/nllb-200-distilled-600M
11
  ---
12
 
13
+ # Translator App built with Transformers.js + Tamagui + Next.js
14
 
15
+ ## πŸ”¦ About
16
 
17
+ This Translator app is a starter for a Transformers.js + Tamagui + Next.js
18
+
19
+ Please check out the demo site
20
+ [![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)
21
+ or [Vercel app](https://translator-tamagui.vercel.app/).
22
+
23
+ ## πŸ“¦ Included packages
24
+
25
+ - Transformers.js
26
+ - Tamagui πŸͺ„
27
+ - Next.js
28
+
29
+ ## πŸ—‚ Folder layout
30
+
31
+ The main apps are:
32
+
33
+ - `src` all the components and screens
34
+
35
+ ## 🏁 Start the app
36
+
37
+ 1. Clone the repo and install dependencies:
38
+
39
+ ```bash
40
+ git clone https://github.com/huuquyet/translator-tamagui.git
41
+ cd translator-tamagui
42
+ yarn install
43
+ ```
44
+
45
+ 2. Run the development server:
46
+
47
+ ```bash
48
+ yarn dev
49
+ ```
50
+ > Firefox users need to change the `dom.workers.modules.enabled` setting in `about:config` to `true` to enable Web Workers.
51
+ > Check out [this issue](https://github.com/xenova/whisper-web/issues/8) for more details.
52
+
53
+ 3. Open the link (e.g., [http://localhost:3000/](http://localhost:3000/)) in your browser.
54
+
55
+ ## πŸ†• Add new dependencies
56
+
57
+ ### Pure JS dependencies
58
+
59
+ If you're installing a JavaScript-only dependency that will be used across platforms, install it :
60
+
61
+ ```sh
62
+ yarn add zustand
63
+ ```
64
+
65
+ ## Update new dependencies
66
+
67
+ ### Pure JS dependencies
68
+
69
+ ```sh
70
+ yarn upgrade-interactive
71
+ ```
72
+
73
+ 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.
74
+
75
+ ## Deploying to Vercel
76
+
77
+ - Install vercel cli (if not): `npm i -g vercel`
78
+ - Login to vercel: `vercel login`
79
+ - Build command to be `vercel build` (add `--prod` if wanna build production version)
80
+ - Build command: leave default setting
81
+ - Output dir: leave default setting
82
+ - Deploy to vercel: `vercel --prebuilt` (add `--prod` if wanna deploy to production)