Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
|