kargaranamir
commited on
Commit
·
9310586
1
Parent(s):
f6d6f66
Update README.md
Browse files
README.md
CHANGED
@@ -30,9 +30,22 @@ Here is how to use this model to detect the language of a given text:
|
|
30 |
>>> model_path = hf_hub_download(repo_id="cis-lmu/glotlid", filename="model.bin")
|
31 |
>>> model = fasttext.load_model(model_path)
|
32 |
>>> model.predict("Hello, world!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
|
|
|
|
|
|
|
|
|
|
34 |
```
|
35 |
|
|
|
36 |
## License
|
37 |
|
38 |
The model is distributed under the Apache License, Version 2.0.
|
|
|
30 |
>>> model_path = hf_hub_download(repo_id="cis-lmu/glotlid", filename="model.bin")
|
31 |
>>> model = fasttext.load_model(model_path)
|
32 |
>>> model.predict("Hello, world!")
|
33 |
+
```
|
34 |
+
|
35 |
+
If you are not a fan of huggingface_hub, then download the model directyly:
|
36 |
+
|
37 |
+
```python
|
38 |
+
>>> ! wget https://huggingface.co/cis-lmu/glotlid/resolve/main/model.bin
|
39 |
+
```
|
40 |
|
41 |
+
```python
|
42 |
+
>>> import fasttext
|
43 |
+
|
44 |
+
>>> model = fasttext.load_model("/path/to/model.bin")
|
45 |
+
>>> model.predict("Hello, world!")
|
46 |
```
|
47 |
|
48 |
+
|
49 |
## License
|
50 |
|
51 |
The model is distributed under the Apache License, Version 2.0.
|