qnguyen3 commited on
Commit
6237888
1 Parent(s): c11a322

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -22,6 +22,8 @@ model = LlavaQwen2ForCausalLM.from_pretrained(
22
  torch_dtype=torch.float16,
23
  trust_remote_code=True)
24
 
 
 
25
  class KeywordsStoppingCriteria(StoppingCriteria):
26
  def __init__(self, keywords, tokenizer, input_ids):
27
  self.keywords = keywords
 
22
  torch_dtype=torch.float16,
23
  trust_remote_code=True)
24
 
25
+ model.to('cuda')
26
+
27
  class KeywordsStoppingCriteria(StoppingCriteria):
28
  def __init__(self, keywords, tokenizer, input_ids):
29
  self.keywords = keywords