Bofandra commited on
Commit
0dee5de
·
verified ·
1 Parent(s): de1dc70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,10 +58,10 @@ def respond(
58
  for index, row in sorted_references.iterrows():
59
  print(index)
60
  print(f'{row["user"]}')
61
- user = translator.translate(f'{row["user"]}', src='ar', dest='en')
62
  print(user)
63
  print(row['assistant'])
64
- assistant = translator.translate(row['assistant'])
65
  print(assistant)
66
  messages.append({"role": "user", "content":user })
67
  messages.append({"role": "assistant", "content": assistant})
 
58
  for index, row in sorted_references.iterrows():
59
  print(index)
60
  print(f'{row["user"]}')
61
+ user = translator.translate(f'{row["user"]}', src='ar', dest='en').text
62
  print(user)
63
  print(row['assistant'])
64
+ assistant = translator.translate(row['assistant']).text
65
  print(assistant)
66
  messages.append({"role": "user", "content":user })
67
  messages.append({"role": "assistant", "content": assistant})