AstraBert commited on
Commit
f339fe9
1 Parent(s): 5239972
Files changed (1) hide show
  1. app.py +2 -2
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"].split("Answer\n")[1]
12
  else:
13
  translation = txt.translatef()
14
  response = pipe(translation)
15
- t = Translation(response[0]["generated_text"].split("Answer\n")[1], txt.original)
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