Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def translate_to_japanese(api_key, text): #openai api key
|
|
| 35 |
|
| 36 |
translated_text=response_translation.choices[0].message['content'].strip()
|
| 37 |
|
| 38 |
-
|
| 39 |
{"role": "system", "content": "You are a helpful assistant who provides only the phonetic pronunciation (Romaji) of Japanese text, in square brackets."},
|
| 40 |
{"role": "user", "content": f"Provide only the Romaji pronunciation (phonetic) for this Japanese text:\n\n{translated_text}"} #prompt template
|
| 41 |
]
|
|
|
|
| 35 |
|
| 36 |
translated_text=response_translation.choices[0].message['content'].strip()
|
| 37 |
|
| 38 |
+
messages_pronunciation = [
|
| 39 |
{"role": "system", "content": "You are a helpful assistant who provides only the phonetic pronunciation (Romaji) of Japanese text, in square brackets."},
|
| 40 |
{"role": "user", "content": f"Provide only the Romaji pronunciation (phonetic) for this Japanese text:\n\n{translated_text}"} #prompt template
|
| 41 |
]
|