Simon Clematide
commited on
Commit
·
3b2c930
1
Parent(s):
261e4e1
Add installation instructions and format code block in README.md
Browse files
README.md
CHANGED
|
@@ -2,10 +2,13 @@
|
|
| 2 |
license: agpl-3.0
|
| 3 |
---
|
| 4 |
|
|
|
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
|
|
|
| 8 |
|
|
|
|
| 9 |
|
| 10 |
```python
|
| 11 |
from transformers import pipeline
|
|
@@ -19,7 +22,10 @@ lang_pipeline = pipeline(
|
|
| 19 |
device="cpu",
|
| 20 |
)
|
| 21 |
|
| 22 |
-
sentence = """En l'an 1348, au plus fort des ravages de la peste noire à travers
|
|
|
|
|
|
|
| 23 |
|
| 24 |
langs = lang_pipeline(sentence)
|
| 25 |
print(langs)
|
|
|
|
|
|
| 2 |
license: agpl-3.0
|
| 3 |
---
|
| 4 |
|
| 5 |
+
## How to install
|
| 6 |
|
| 7 |
+
```bash
|
| 8 |
+
pip install transformers floret
|
| 9 |
+
```
|
| 10 |
|
| 11 |
+
## How to run:
|
| 12 |
|
| 13 |
```python
|
| 14 |
from transformers import pipeline
|
|
|
|
| 22 |
device="cpu",
|
| 23 |
)
|
| 24 |
|
| 25 |
+
sentence = """En l'an 1348, au plus fort des ravages de la peste noire à travers
|
| 26 |
+
l'Europe, le Royaume de France se trouvait à la fois au bord du désespoir et
|
| 27 |
+
face à une opportunité."""
|
| 28 |
|
| 29 |
langs = lang_pipeline(sentence)
|
| 30 |
print(langs)
|
| 31 |
+
```
|