Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- ko
|
4 |
+
- en
|
5 |
+
metrics:
|
6 |
+
- bleu
|
7 |
+
pipeline_tag: translation
|
8 |
+
tags:
|
9 |
+
- science
|
10 |
+
- technology
|
11 |
+
---
|
12 |
+
|
13 |
+
# Model Overview
|
14 |
+
This model is fine-tuned model of "Helsinki-NLP/opus-mt-ko-en" <br/>
|
15 |
+
The model has been trained with 1,198,943 Korean, Enlgish sentence pairs which mainly contains science, technology terms.
|
16 |
+
|
17 |
+
# Load Model
|
18 |
+
```
|
19 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
20 |
+
|
21 |
+
tokenizer = AutoTokenizer.from_pretrained("mjk0618/mt-ko-en-scitech")
|
22 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("mjk0618/mt-ko-en-scitech")
|
23 |
+
```
|
24 |
+
|
25 |
+
# How to use
|
26 |
+
```
|
27 |
+
# After loading model
|
28 |
+
# Define the text you want to translate
|
29 |
+
sentence = "์ธ๊ณต์ง๋ฅ์ ์ธ๊ฐ์ ํ์ต๋ฅ๋ ฅ, ์ถ๋ก ๋ฅ๋ ฅ, ์ง๊ฐ๋ฅ๋ ฅ์ ์ธ๊ณต์ ์ผ๋ก ๊ตฌํํ๋ ค๋ ์ปดํจํฐ ๊ณผํ์ ์ธ๋ถ๋ถ์ผ ์ค ํ๋์ด๋ค"
|
30 |
+
|
31 |
+
# Tokenize the text
|
32 |
+
inputs = tokenizer(sentence, return_tensors="pt").input_ids
|
33 |
+
|
34 |
+
# Generate the translated text
|
35 |
+
outputs = model.generate(inputs)[0]
|
36 |
+
|
37 |
+
# Decode the translated text
|
38 |
+
translated_sentence = tokenizer.decode(outputs, skip_special_tokens=True)
|
39 |
+
|
40 |
+
print(translated_sentence)
|
41 |
+
# Artificial intelligence is one of the details of computer science that artifically implements human learning ability, reasoning ability, and perception ability.
|
42 |
+
```
|