gregH commited on
Commit
735167a
1 Parent(s): b0e5743

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -15,7 +15,8 @@ tok = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-zephyr-1_6b", trust_
15
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
16
  embedding_func=m.get_input_embeddings()
17
  embedding_func.weight.requires_grad=False
18
- chat=[{"role": "user", "content": "<slot_for_user_input_design_by_xm>"}]
 
19
  sample_input = tok.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
20
  input_start_id=sample_input.find(slot)
21
  prefix=sample_input[:input_start_id]
 
15
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
16
  embedding_func=m.get_input_embeddings()
17
  embedding_func.weight.requires_grad=False
18
+ slot="<slot_for_user_input_design_by_xm>"
19
+ chat=[{"role": "user", "content": slot}]
20
  sample_input = tok.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
21
  input_start_id=sample_input.find(slot)
22
  prefix=sample_input[:input_start_id]