Update README.md
Browse files
README.md
CHANGED
@@ -3,4 +3,37 @@ license: agpl-3.0
|
|
3 |
language:
|
4 |
- en
|
5 |
- cop
|
6 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
language:
|
4 |
- en
|
5 |
- cop
|
6 |
+
---
|
7 |
+
|
8 |
+
|
9 |
+
# How To Use This Model
|
10 |
+
|
11 |
+
## Sahidic Example With No Confidence Score
|
12 |
+
```
|
13 |
+
from transformers import pipeline
|
14 |
+
|
15 |
+
pipe = pipeline(model="megalaa/english-coptic-translator", trust_remote_code=True)
|
16 |
+
|
17 |
+
output = pipe("Jesus Christ")
|
18 |
+
print(output)
|
19 |
+
# {'translation': 'ⲓⲏⲥⲟⲩⲥ ⲡⲉⲭⲣⲓⲥⲧⲟⲥ.'}
|
20 |
+
|
21 |
+
```
|
22 |
+
|
23 |
+
## Parameters
|
24 |
+
By default, this models translates from English to Sahidic Coptic.
|
25 |
+
|
26 |
+
Use `to_bohairic=True` if you are translating from English to Bohairic Coptic.
|
27 |
+
|
28 |
+
Additionally, use `output_confidence=True` if you want to output the model confidence.
|
29 |
+
|
30 |
+
## Bohairic Example With Confidence Score
|
31 |
+
|
32 |
+
```
|
33 |
+
from transformers import pipeline
|
34 |
+
|
35 |
+
pipe = pipeline(model="megalaa/english-coptic-translator", trust_remote_code=True)
|
36 |
+
output = pipe("Jesus Christ", to_bohairic=True, output_confidence=True)
|
37 |
+
print(output)
|
38 |
+
# {'translation': 'ⲓⲏⲥⲟⲩⲥ ⲡⲓⲭⲣⲓⲥⲧⲟⲥ', 'confidence': 0.9277395772214944}
|
39 |
+
```
|