Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ chat_history = []
|
|
15 |
|
16 |
def chatbot(input_text):
|
17 |
global chat_history
|
18 |
-
chat_history.append(
|
19 |
inputs = tokenizer([input_text], return_tensors='pt')
|
20 |
|
21 |
# Generate a response
|
@@ -29,7 +29,7 @@ def chatbot(input_text):
|
|
29 |
translation_outputs = translation_model.generate(**translation_inputs)
|
30 |
translated_response = translation_tokenizer.decode(translation_outputs[0], skip_special_tokens=True)
|
31 |
|
32 |
-
chat_history.append(
|
33 |
|
34 |
return "\n".join(chat_history)
|
35 |
|
|
|
15 |
|
16 |
def chatbot(input_text):
|
17 |
global chat_history
|
18 |
+
chat_history.append(input_text)
|
19 |
inputs = tokenizer([input_text], return_tensors='pt')
|
20 |
|
21 |
# Generate a response
|
|
|
29 |
translation_outputs = translation_model.generate(**translation_inputs)
|
30 |
translated_response = translation_tokenizer.decode(translation_outputs[0], skip_special_tokens=True)
|
31 |
|
32 |
+
chat_history.append(translated_response)
|
33 |
|
34 |
return "\n".join(chat_history)
|
35 |
|