Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,8 +39,8 @@ def convert_number_to_words(number: float) -> str:
|
|
39 |
# You can change 'hy' to the appropriate target language code
|
40 |
target_lang = 'hy'
|
41 |
|
42 |
-
#
|
43 |
-
translated_words =
|
44 |
|
45 |
return translated_words
|
46 |
|
|
|
39 |
# You can change 'hy' to the appropriate target language code
|
40 |
target_lang = 'hy'
|
41 |
|
42 |
+
# Use asyncio.run even if an event loop is already running (nested asyncio)
|
43 |
+
translated_words = asyncio.run(translate_text(words, source_lang, target_lang))
|
44 |
|
45 |
return translated_words
|
46 |
|