Spaces:
Running
on
Zero
Running
on
Zero
Update vlm.py
Browse files
vlm.py
CHANGED
@@ -14,7 +14,7 @@ import torch
|
|
14 |
#
|
15 |
# Load the model: google/gemma-3-4b-it
|
16 |
#
|
17 |
-
device = '
|
18 |
model_id = "google/gemma-3-4b-it"
|
19 |
processor = AutoProcessor.from_pretrained(model_id, use_fast=True, padding_side="left")
|
20 |
model = Gemma3ForConditionalGeneration.from_pretrained(
|
|
|
14 |
#
|
15 |
# Load the model: google/gemma-3-4b-it
|
16 |
#
|
17 |
+
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
18 |
model_id = "google/gemma-3-4b-it"
|
19 |
processor = AutoProcessor.from_pretrained(model_id, use_fast=True, padding_side="left")
|
20 |
model = Gemma3ForConditionalGeneration.from_pretrained(
|