ColdSlim commited on
Commit
55c6a02
·
verified ·
1 Parent(s): fb1d4ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,6 +25,7 @@ from peft import PeftModel
25
  # ---------------------------------------------------------------------
26
  BASE_MODEL = "Qwen/Qwen2.5-VL-7B-Instruct"
27
  ADAPTER_REPO = "ColdSlim/PetBull-7B" # 👉 replace with your HF path if different
 
28
 
29
  device = "cuda" if torch.cuda.is_available() else "cpu"
30
  dtype = torch.float16 if device == "cuda" else torch.float32
@@ -32,7 +33,7 @@ dtype = torch.float16 if device == "cuda" else torch.float32
32
  processor = AutoProcessor.from_pretrained(BASE_MODEL, trust_remote_code=True)
33
  base = AutoModelForVision2Seq.from_pretrained(
34
  BASE_MODEL, torch_dtype=dtype, trust_remote_code=True)
35
- model = PeftModel.from_pretrained(base, ADAPTER_REPO)
36
  model.to(device).eval()
37
 
38
  # ---------------------------------------------------------------------
 
25
  # ---------------------------------------------------------------------
26
  BASE_MODEL = "Qwen/Qwen2.5-VL-7B-Instruct"
27
  ADAPTER_REPO = "ColdSlim/PetBull-7B" # 👉 replace with your HF path if different
28
+ ADAPTER_REV = "master"
29
 
30
  device = "cuda" if torch.cuda.is_available() else "cpu"
31
  dtype = torch.float16 if device == "cuda" else torch.float32
 
33
  processor = AutoProcessor.from_pretrained(BASE_MODEL, trust_remote_code=True)
34
  base = AutoModelForVision2Seq.from_pretrained(
35
  BASE_MODEL, torch_dtype=dtype, trust_remote_code=True)
36
+ model = PeftModel.from_pretrained(base, ADAPTER_REPO, revision=ADAPTER_REV)
37
  model.to(device).eval()
38
 
39
  # ---------------------------------------------------------------------