Update app.py
Browse files
app.py
CHANGED
|
@@ -88,9 +88,9 @@ def search_maps():
|
|
| 88 |
def translate_text():
|
| 89 |
query = request.args.get('q', '')
|
| 90 |
to_lang = request.args.get('to', 'en')
|
| 91 |
-
|
| 92 |
with WEBS() as webs:
|
| 93 |
-
translation =
|
| 94 |
|
| 95 |
return jsonify({'translation': translation})
|
| 96 |
|
|
|
|
| 88 |
def translate_text():
|
| 89 |
query = request.args.get('q', '')
|
| 90 |
to_lang = request.args.get('to', 'en')
|
| 91 |
+
WEBS_instance = WEBS()
|
| 92 |
with WEBS() as webs:
|
| 93 |
+
translation = enumerate(WEBS_instance.translate(query, to=to_lang))
|
| 94 |
|
| 95 |
return jsonify({'translation': translation})
|
| 96 |
|