Arikkod commited on
Commit
3d691cc
ยท
1 Parent(s): 784d218

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ model = AutoModelForCausalLM.from_pretrained("Norod78/hebrew-gpt_neo-xl", pad_to
8
  model.to(device)
9
 
10
  def chat(message, history=[]):
11
- new_user_input_ids = tokenizer.encode(message+tokenizer.eos_token, return_tensors='pt')
12
  if len(history) > 0:
13
  last_set_of_ids = history[len(history)-1][2]
14
  bot_input_ids = torch.cat([last_set_of_ids, new_user_input_ids], dim=-1)
 
8
  model.to(device)
9
 
10
  def chat(message, history=[]):
11
+ new_user_input_ids = tokenizer.encode(tokenizer.eos_token + message, return_tensors='pt')
12
  if len(history) > 0:
13
  last_set_of_ids = history[len(history)-1][2]
14
  bot_input_ids = torch.cat([last_set_of_ids, new_user_input_ids], dim=-1)