Instructions to use laurievb/OpenLID-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- fastText
How to use laurievb/OpenLID-v2 with fastText:
from huggingface_hub import hf_hub_download import fasttext model = fasttext.load_model(hf_hub_download("laurievb/OpenLID-v2", "model.bin")) - Notebooks
- Google Colab
- Kaggle
correct model name
Browse files
README.md
CHANGED
|
@@ -36,7 +36,7 @@ Here is how to use this model to detect the language of a given text. For best r
|
|
| 36 |
>>> from openlid import clean_text
|
| 37 |
>>> from huggingface_hub import hf_hub_download
|
| 38 |
|
| 39 |
-
>>> model_path = hf_hub_download(repo_id="laurievb/OpenLID-v2", filename="
|
| 40 |
>>> model = fasttext.load_model(model_path)
|
| 41 |
>>> input_text = clean_text("Hello, world!")
|
| 42 |
>>> model.predict(input_text)
|
|
|
|
| 36 |
>>> from openlid import clean_text
|
| 37 |
>>> from huggingface_hub import hf_hub_download
|
| 38 |
|
| 39 |
+
>>> model_path = hf_hub_download(repo_id="laurievb/OpenLID-v2", filename="openlid_v2.bin")
|
| 40 |
>>> model = fasttext.load_model(model_path)
|
| 41 |
>>> input_text = clean_text("Hello, world!")
|
| 42 |
>>> model.predict(input_text)
|