Edmon02 commited on
Commit
670498a
1 Parent(s): d52fcfd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- # Perform translation asynchronously
43
- translated_words = httpx.run(translate_text, words, source_lang, target_lang)
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