fhaddad commited on
Commit
1a78a66
1 Parent(s): 0344d80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,7 +15,7 @@ chat_history = []
15
 
16
  def chatbot(input_text):
17
  global chat_history
18
- chat_history.append(f"You: {input_text}")
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(f"Bot: {translated_response}")
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