Update README.md
Browse files
README.md
CHANGED
@@ -36,7 +36,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_path)
|
|
36 |
|
37 |
def translate(
|
38 |
text: str,
|
39 |
-
to: Literal["
|
40 |
**kwargs
|
41 |
):
|
42 |
generation_args = dict(
|
@@ -73,7 +73,7 @@ def translate(
|
|
73 |
return response
|
74 |
|
75 |
text = "After a long day at work, I love to unwind by cooking a nice dinner and watching my favorite TV series. It really helps me relax and recharge for the next day."
|
76 |
-
response = translate(text=text, to='
|
77 |
print(f'Translation: {response}')
|
78 |
|
79 |
"""
|
|
|
36 |
|
37 |
def translate(
|
38 |
text: str,
|
39 |
+
to: Literal["Chinese", "English"] = "Chinese",
|
40 |
**kwargs
|
41 |
):
|
42 |
generation_args = dict(
|
|
|
73 |
return response
|
74 |
|
75 |
text = "After a long day at work, I love to unwind by cooking a nice dinner and watching my favorite TV series. It really helps me relax and recharge for the next day."
|
76 |
+
response = translate(text=text, to='Chinese')
|
77 |
print(f'Translation: {response}')
|
78 |
|
79 |
"""
|