Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ def translation_to_French(api_key, text):
|
|
| 27 |
max_output_tokens=150
|
| 28 |
)
|
| 29 |
)
|
| 30 |
-
translated =
|
| 31 |
|
| 32 |
# Pronunciation prompt
|
| 33 |
pronunciation_prompt = (
|
|
@@ -43,7 +43,7 @@ def translation_to_French(api_key, text):
|
|
| 43 |
max_output_tokens=150
|
| 44 |
)
|
| 45 |
)
|
| 46 |
-
pronunciation = response_pronunciation.
|
| 47 |
return translated, pronunciation
|
| 48 |
|
| 49 |
except Exception as e:
|
|
|
|
| 27 |
max_output_tokens=150
|
| 28 |
)
|
| 29 |
)
|
| 30 |
+
translated = response_translation.candidates[0].content.strip()
|
| 31 |
|
| 32 |
# Pronunciation prompt
|
| 33 |
pronunciation_prompt = (
|
|
|
|
| 43 |
max_output_tokens=150
|
| 44 |
)
|
| 45 |
)
|
| 46 |
+
pronunciation = response_pronunciation.candidates[0].content.strip()
|
| 47 |
return translated, pronunciation
|
| 48 |
|
| 49 |
except Exception as e:
|