Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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
|