Update README.md
Browse filesChange name of pipeline to correspond to HF repository name and impresso conventions.
README.md
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
---
|
2 |
-
license: agpl-3.0
|
3 |
-
---
|
4 |
-
|
5 |
-
|
6 |
-
## How to run:
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
```python
|
11 |
-
from transformers import pipeline
|
12 |
-
|
13 |
-
MODEL_NAME = "impresso-project/impresso-langident"
|
14 |
-
|
15 |
-
lang_pipeline = pipeline(
|
16 |
-
"
|
17 |
-
model=MODEL_NAME,
|
18 |
-
trust_remote_code=True,
|
19 |
-
device="cpu",
|
20 |
-
)
|
21 |
-
|
22 |
-
sentence = """En l'an 1348, au plus fort des ravages de la peste noire à travers l'Europe, le Royaume de France se trouvait à la fois au bord du désespoir et face à une opportunité."""
|
23 |
-
|
24 |
-
langs = lang_pipeline(sentence)
|
25 |
-
print(langs)
|
|
|
1 |
+
---
|
2 |
+
license: agpl-3.0
|
3 |
+
---
|
4 |
+
|
5 |
+
|
6 |
+
## How to run:
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
```python
|
11 |
+
from transformers import pipeline
|
12 |
+
|
13 |
+
MODEL_NAME = "impresso-project/impresso-langident"
|
14 |
+
|
15 |
+
lang_pipeline = pipeline(
|
16 |
+
"langident",
|
17 |
+
model=MODEL_NAME,
|
18 |
+
trust_remote_code=True,
|
19 |
+
device="cpu",
|
20 |
+
)
|
21 |
+
|
22 |
+
sentence = """En l'an 1348, au plus fort des ravages de la peste noire à travers l'Europe, le Royaume de France se trouvait à la fois au bord du désespoir et face à une opportunité."""
|
23 |
+
|
24 |
+
langs = lang_pipeline(sentence)
|
25 |
+
print(langs)
|