dwb2023 commited on
Commit
76ca0d6
1 Parent(s): 8f78c3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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, adapter_model_name).to(device)
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")