Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -31,12 +31,12 @@ login(token = os.getenv('gemma'))
|
|
31 |
messages = [
|
32 |
{"role": "user", "content": "Who are you?"},
|
33 |
]
|
34 |
-
pipe = pipeline("image-text-to-text", model="google/gemma-3-4b-it")
|
35 |
print(pipe(messages))
|
36 |
|
37 |
|
38 |
ckpt = "google/gemma-3-4b-it"
|
39 |
-
model = Gemma3ForConditionalGeneration.from_pretrained(ckpt, torch_dtype=torch.bfloat16
|
40 |
processor = AutoProcessor.from_pretrained(ckpt)
|
41 |
|
42 |
@spaces.GPU
|
|
|
31 |
messages = [
|
32 |
{"role": "user", "content": "Who are you?"},
|
33 |
]
|
34 |
+
pipe = pipeline("image-text-to-text", model="google/gemma-3-4b-it").to("cuda")
|
35 |
print(pipe(messages))
|
36 |
|
37 |
|
38 |
ckpt = "google/gemma-3-4b-it"
|
39 |
+
model = Gemma3ForConditionalGeneration.from_pretrained(ckpt, torch_dtype=torch.bfloat16).to("cuda")
|
40 |
processor = AutoProcessor.from_pretrained(ckpt)
|
41 |
|
42 |
@spaces.GPU
|