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