Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -14,11 +14,10 @@ import numpy as np
|
|
14 |
import spaces
|
15 |
|
16 |
|
17 |
-
hf_token = os.getenv("HF_TOKEN")
|
18 |
model_id = "google/paligemma-3b-mix-448"
|
19 |
COLORS = ['#4285f4', '#db4437', '#f4b400', '#0f9d58', '#e48ef1']
|
20 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
21 |
-
model = PaliGemmaForConditionalGeneration.from_pretrained(model_id
|
22 |
processor = PaliGemmaProcessor.from_pretrained(model_id)
|
23 |
|
24 |
###### Transformers Inference
|
|
|
14 |
import spaces
|
15 |
|
16 |
|
|
|
17 |
model_id = "google/paligemma-3b-mix-448"
|
18 |
COLORS = ['#4285f4', '#db4437', '#f4b400', '#0f9d58', '#e48ef1']
|
19 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
20 |
+
model = PaliGemmaForConditionalGeneration.from_pretrained(model_id).eval().to(device)
|
21 |
processor = PaliGemmaProcessor.from_pretrained(model_id)
|
22 |
|
23 |
###### Transformers Inference
|