Spaces:
Sleeping
Sleeping
AstraBert
commited on
Commit
•
f339fe9
1
Parent(s):
5239972
bloom
Browse files
app.py
CHANGED
@@ -8,11 +8,11 @@ def reply(message, history):
|
|
8 |
txt = Translation(message, "en")
|
9 |
if txt.original == "en":
|
10 |
response = pipe(message)
|
11 |
-
return response[0]["generated_text"]
|
12 |
else:
|
13 |
translation = txt.translatef()
|
14 |
response = pipe(translation)
|
15 |
-
t = Translation(response[0]["generated_text"]
|
16 |
res = t.translatef()
|
17 |
return res
|
18 |
|
|
|
8 |
txt = Translation(message, "en")
|
9 |
if txt.original == "en":
|
10 |
response = pipe(message)
|
11 |
+
return response[0]["generated_text"]
|
12 |
else:
|
13 |
translation = txt.translatef()
|
14 |
response = pipe(translation)
|
15 |
+
t = Translation(response[0]["generated_text"], txt.original)
|
16 |
res = t.translatef()
|
17 |
return res
|
18 |
|