Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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})
|