nidhal baccouri
commited on
Commit
·
af08fe3
1
Parent(s):
f7189fa
converted default dict get to None
Browse files- deep_translator/qcri.py +1 -1
deep_translator/qcri.py
CHANGED
|
@@ -74,7 +74,7 @@ class QCRI(object):
|
|
| 74 |
ServerException(response.status_code)
|
| 75 |
else:
|
| 76 |
res = response.json()
|
| 77 |
-
translation = res
|
| 78 |
if not translation:
|
| 79 |
raise TranslationNotFound(text)
|
| 80 |
return translation
|
|
|
|
| 74 |
ServerException(response.status_code)
|
| 75 |
else:
|
| 76 |
res = response.json()
|
| 77 |
+
translation = res.get("translatedText")
|
| 78 |
if not translation:
|
| 79 |
raise TranslationNotFound(text)
|
| 80 |
return translation
|