Spaces:
Runtime error
Runtime error
fixed the translation
Browse files
app.py
CHANGED
@@ -28,8 +28,8 @@ def get_answer(user_input, decoding_method, num_beams, top_k, top_p, temperature
|
|
28 |
if r.status_code == 200:
|
29 |
result = r.json()
|
30 |
answer = result["generated_text"]
|
31 |
-
user_input_en = translate(user_input, "en", "
|
32 |
-
answer_en = translate(answer, "en", "
|
33 |
return [(f"{user_input}\n", None), (answer, "")], \
|
34 |
[(f"{user_input_en}\n", None), (answer_en, "")]
|
35 |
else:
|
|
|
28 |
if r.status_code == 200:
|
29 |
result = r.json()
|
30 |
answer = result["generated_text"]
|
31 |
+
user_input_en = translate(user_input, "en", "auto")
|
32 |
+
answer_en = translate(answer, "en", "auto")
|
33 |
return [(f"{user_input}\n", None), (answer, "")], \
|
34 |
[(f"{user_input_en}\n", None), (answer_en, "")]
|
35 |
else:
|