Translation
English
Icelandic
Eval Results (legacy)
radinplaid commited on
Commit
6bc3911
·
verified ·
1 Parent(s): 2c89848

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -8
README.md CHANGED
@@ -39,7 +39,7 @@ model-index:
39
 
40
  ## Try it on our Huggingface Space
41
 
42
- Give it a try before downloading here: https://huggingface.co/spaces/quickmt/QuickMT-Demo
43
 
44
 
45
  ## Model Information
@@ -57,22 +57,25 @@ See the `eole` model configuration in this repository for further details and th
57
 
58
  You must install the Nvidia cuda toolkit first, if you want to do GPU inference.
59
 
60
- Next, install the `quickmt` python library and download the model:
61
 
62
  ```bash
63
  git clone https://github.com/quickmt/quickmt.git
64
  pip install ./quickmt/
65
-
66
- quickmt-model-download quickmt/quickmt-is-en ./quickmt-is-en
67
  ```
68
 
69
- Finally use the model in python:
70
 
71
  ```python
72
  from quickmt import Translator
73
-
74
- # Auto-detects GPU, set to "cpu" to force CPU inference
75
- t = Translator("./quickmt-is-en/", device="auto")
 
 
 
 
 
76
 
77
  # Translate - set beam size to 1 for faster speed (but lower quality)
78
  sample_text = 'Dr. Ehud Ur, læknaprófessor við Dalhousie-háskólann í Halifax í Nova Scotia og formaður klínískrar vísindadeildar Kanadíska sykursýkissambandsins, minnti á að rannsóknin væri rétt nýhafin.'
 
39
 
40
  ## Try it on our Huggingface Space
41
 
42
+ Give it a try before downloading here: https://huggingface.co/spaces/quickmt/QuickMT-gui
43
 
44
 
45
  ## Model Information
 
57
 
58
  You must install the Nvidia cuda toolkit first, if you want to do GPU inference.
59
 
60
+ Next, install the `quickmt` [python library](github.com/quickmt/quickmt).
61
 
62
  ```bash
63
  git clone https://github.com/quickmt/quickmt.git
64
  pip install ./quickmt/
 
 
65
  ```
66
 
67
+ Finally, use the model in python:
68
 
69
  ```python
70
  from quickmt import Translator
71
+ from huggingface_hub import snapshot_download
72
+
73
+ # Download Model (if not downloaded already) and return path to local model
74
+ # Device is either 'auto', 'cpu' or 'cuda'
75
+ t = Translator(
76
+ snapshot_download("quickmt/quickmt-zh-en", ignore_patterns="eole-model/*"),
77
+ device="cpu"
78
+ )
79
 
80
  # Translate - set beam size to 1 for faster speed (but lower quality)
81
  sample_text = 'Dr. Ehud Ur, læknaprófessor við Dalhousie-háskólann í Halifax í Nova Scotia og formaður klínískrar vísindadeildar Kanadíska sykursýkissambandsins, minnti á að rannsóknin væri rétt nýhafin.'