selamw commited on
Commit
0a4717d
·
verified ·
1 Parent(s): 471e89f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -53,7 +53,7 @@ def infer_fin_pali(image, question):
53
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
54
  torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
55
 
56
- model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch_dtype, trust_remote_code=True, token=access_token).to(device)
57
  processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True, token=access_token)
58
  ###
59
 
 
53
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
54
  torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
55
 
56
+ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch_dtype, trust_remote_code=True, quantization_config=bnb_config,token=access_token).to(device)
57
  processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True, token=access_token)
58
  ###
59