Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,8 @@ async def translate_bulk_parallel(bulk: list) -> list:
|
|
36 |
futures = [executor.submit(translator.translate, text, dest="en") for text in bulk]
|
37 |
for future, original_text in zip(futures, bulk):
|
38 |
try:
|
39 |
-
translated_text = future
|
|
|
40 |
translated_bulk.append(translated_text)
|
41 |
except Exception as e:
|
42 |
print(f"Translation failed: {e}")
|
|
|
36 |
futures = [executor.submit(translator.translate, text, dest="en") for text in bulk]
|
37 |
for future, original_text in zip(futures, bulk):
|
38 |
try:
|
39 |
+
translated_text = await future
|
40 |
+
translated_text = translated_text.text.lower().strip()
|
41 |
translated_bulk.append(translated_text)
|
42 |
except Exception as e:
|
43 |
print(f"Translation failed: {e}")
|