Translation
Persian
English
Eval Results (legacy)
radinplaid commited on
Commit
fa2311b
·
verified ·
1 Parent(s): 1ce1362

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -9
README.md CHANGED
@@ -47,7 +47,7 @@ This model was trained with back-translated data and has improved translation qu
47
 
48
  ## Try it on our Huggingface Space
49
 
50
- Give it a try before downloading here: https://huggingface.co/spaces/quickmt/QuickMT-Demo
51
 
52
 
53
  ## Model Information
@@ -65,22 +65,25 @@ See the `eole` model configuration in this repository for further details and th
65
 
66
  You must install the Nvidia cuda toolkit first, if you want to do GPU inference.
67
 
68
- Next, install the `quickmt` python library and download the model:
69
 
70
  ```bash
71
  git clone https://github.com/quickmt/quickmt.git
72
- pip install -e ./quickmt/
73
-
74
- quickmt-model-download quickmt/quickmt-fa-en ./quickmt-fa-en
75
  ```
76
 
77
- Finally use the model in python:
78
 
79
  ```python
80
  from quickmt import Translator
81
-
82
- # Auto-detects GPU, set to "cpu" to force CPU inference
83
- mt = Translator("./quickmt-ar-en/", device="auto")
 
 
 
 
 
84
 
85
  # Translate - set beam size to 1 for faster speed (but lower quality)
86
  sample_text = 'دکتر ایهود اور، استاد پزشکی دانشگاه دالهاوزی در هلیفکس، نوااسکوشیا و رئیس بخش کلینیکی و علمی انجمن دیابت کانادا هشدار داد که این تحقیق هنوز در روزهای آغازین خود می\u200cباشد.'
 
47
 
48
  ## Try it on our Huggingface Space
49
 
50
+ Give it a try before downloading here: https://huggingface.co/spaces/quickmt/QuickMT-gui
51
 
52
 
53
  ## Model Information
 
65
 
66
  You must install the Nvidia cuda toolkit first, if you want to do GPU inference.
67
 
68
+ Next, install the `quickmt` [python library](github.com/quickmt/quickmt).
69
 
70
  ```bash
71
  git clone https://github.com/quickmt/quickmt.git
72
+ pip install ./quickmt/
 
 
73
  ```
74
 
75
+ Finally, use the model in python:
76
 
77
  ```python
78
  from quickmt import Translator
79
+ from huggingface_hub import snapshot_download
80
+
81
+ # Download Model (if not downloaded already) and return path to local model
82
+ # Device is either 'auto', 'cpu' or 'cuda'
83
+ mt = Translator(
84
+ snapshot_download("quickmt/quickmt-fa-en", ignore_patterns="eole-model/*"),
85
+ device="cpu"
86
+ )
87
 
88
  # Translate - set beam size to 1 for faster speed (but lower quality)
89
  sample_text = 'دکتر ایهود اور، استاد پزشکی دانشگاه دالهاوزی در هلیفکس، نوااسکوشیا و رئیس بخش کلینیکی و علمی انجمن دیابت کانادا هشدار داد که این تحقیق هنوز در روزهای آغازین خود می\u200cباشد.'