5to9 commited on
Commit
19ef1ca
·
1 Parent(s): f0039d0

0.8 fixed wrong device

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -136,7 +136,7 @@ def generate_both(system_prompt, input_text, chatbot_a, chatbot_b, max_new_token
136
  if "Pharia" in model_id_b:
137
  logging.debug("model b is Pharia based, applying own template")
138
  formatted_message_b = apply_chat_template(new_messages_a, add_generation_prompt=True)
139
- input_ids_b = tokenizer_b(formatted_message_b, return_tensors="pt").input_ids.to(model_a.device)
140
  else:
141
  input_ids_b = tokenizer_b.apply_chat_template(
142
  new_messages_b,
 
136
  if "Pharia" in model_id_b:
137
  logging.debug("model b is Pharia based, applying own template")
138
  formatted_message_b = apply_chat_template(new_messages_a, add_generation_prompt=True)
139
+ input_ids_b = tokenizer_b(formatted_message_b, return_tensors="pt").input_ids.to(model_b.device)
140
  else:
141
  input_ids_b = tokenizer_b.apply_chat_template(
142
  new_messages_b,