Spaces:
Runtime error
Runtime error
Update module_translation.py
Browse files- module_translation.py +2 -7
module_translation.py
CHANGED
|
@@ -29,13 +29,8 @@ def translate_text(text, tgt_lang):
|
|
| 29 |
messages = [
|
| 30 |
{
|
| 31 |
'role': 'user',
|
| 32 |
-
'content':
|
| 33 |
-
|
| 34 |
-
"type": "text",
|
| 35 |
-
"text": translation_prompt.format(
|
| 36 |
-
code_to_languages[tgt_lang], text)
|
| 37 |
-
}
|
| 38 |
-
]
|
| 39 |
}
|
| 40 |
]
|
| 41 |
|
|
|
|
| 29 |
messages = [
|
| 30 |
{
|
| 31 |
'role': 'user',
|
| 32 |
+
'content': translation_prompt.format(
|
| 33 |
+
code_to_languages[tgt_lang], text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
}
|
| 35 |
]
|
| 36 |
|