Update example
Browse files
README.md
CHANGED
@@ -59,7 +59,39 @@ You can use this model directly with a pipeline for masked language modeling:
|
|
59 |
```python
|
60 |
>>> from transformers import pipeline
|
61 |
>>> unmasker = pipeline('fill-mask', model='qwant/fralbert-base')
|
62 |
-
>>> unmasker("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
```
|
64 |
|
65 |
Here is how to use this model to get the features of a given text in PyTorch:
|
|
|
59 |
```python
|
60 |
>>> from transformers import pipeline
|
61 |
>>> unmasker = pipeline('fill-mask', model='qwant/fralbert-base')
|
62 |
+
>>> unmasker("Paris est la capitale de la [MASK] .")
|
63 |
+
[
|
64 |
+
{
|
65 |
+
"sequence": "paris est la capitale de la france.",
|
66 |
+
"score": 0.6231236457824707,
|
67 |
+
"token": 3043,
|
68 |
+
"token_str": "france"
|
69 |
+
},
|
70 |
+
{
|
71 |
+
"sequence": "paris est la capitale de la region.",
|
72 |
+
"score": 0.2993471622467041,
|
73 |
+
"token": 10531,
|
74 |
+
"token_str": "region"
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"sequence": "paris est la capitale de la societe.",
|
78 |
+
"score": 0.02028230018913746,
|
79 |
+
"token": 24622,
|
80 |
+
"token_str": "societe"
|
81 |
+
},
|
82 |
+
{
|
83 |
+
"sequence": "paris est la capitale de la bretagne.",
|
84 |
+
"score": 0.012089950032532215,
|
85 |
+
"token": 24987,
|
86 |
+
"token_str": "bretagne"
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"sequence": "paris est la capitale de la chine.",
|
90 |
+
"score": 0.010002839379012585,
|
91 |
+
"token": 14860,
|
92 |
+
"token_str": "chine"
|
93 |
+
}
|
94 |
+
]
|
95 |
```
|
96 |
|
97 |
Here is how to use this model to get the features of a given text in PyTorch:
|