Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -11,11 +11,7 @@ from transformers import AutoProcessor, Gemma3ForConditionalGeneration, TextIter
|
|
11 |
|
12 |
from transformers import pipeline
|
13 |
|
14 |
-
|
15 |
-
{"role": "user", "content": "Who are you?"},
|
16 |
-
]
|
17 |
-
pipe = pipeline("image-text-to-text", model="google/gemma-3-4b-it")
|
18 |
-
print(pipe(messages))
|
19 |
|
20 |
|
21 |
"""
|
@@ -32,6 +28,13 @@ duration=None
|
|
32 |
|
33 |
login(token = os.getenv('gemma'))
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
ckpt = "google/gemma-3-4b-it"
|
36 |
model = Gemma3ForConditionalGeneration.from_pretrained(ckpt, torch_dtype=torch.bfloat16,)
|
37 |
processor = AutoProcessor.from_pretrained(ckpt)
|
|
|
11 |
|
12 |
from transformers import pipeline
|
13 |
|
14 |
+
|
|
|
|
|
|
|
|
|
15 |
|
16 |
|
17 |
"""
|
|
|
28 |
|
29 |
login(token = os.getenv('gemma'))
|
30 |
|
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)
|