Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
45 |
model_id = "google/paligemma-3b-pt-224"
|
46 |
adapter_model_id = "dwb2023/paligemma-cnmc-ft"
|
47 |
model = PaliGemmaForConditionalGeneration.from_pretrained(model_id).eval().to(device)
|
48 |
-
model = PeftModel.from_pretrained(model,
|
49 |
|
50 |
model = model.merge_and_unload()
|
51 |
model.save_pretrained("merged_adapters")
|
|
|
45 |
model_id = "google/paligemma-3b-pt-224"
|
46 |
adapter_model_id = "dwb2023/paligemma-cnmc-ft"
|
47 |
model = PaliGemmaForConditionalGeneration.from_pretrained(model_id).eval().to(device)
|
48 |
+
model = PeftModel.from_pretrained(model, adapter_model_id).to(device)
|
49 |
|
50 |
model = model.merge_and_unload()
|
51 |
model.save_pretrained("merged_adapters")
|