asnassar commited on
Commit
a67e9a3
·
1 Parent(s): 6d16759

use auth enabled

Browse files
Files changed (1) hide show
  1. src/app.py +4 -2
src/app.py CHANGED
@@ -114,8 +114,10 @@ sample_data = [
114
  model_id = "ibm-granite/granite-docling-258M"
115
 
116
  if gr.NO_RELOAD:
117
- processor = AutoProcessor.from_pretrained(model_id)
118
- model = Idefics3ForConditionalGeneration.from_pretrained(model_id, device_map=device, torch_dtype=torch.bfloat16)
 
 
119
  if not torch.cuda.is_available():
120
  model = model.to(device)
121
 
 
114
  model_id = "ibm-granite/granite-docling-258M"
115
 
116
  if gr.NO_RELOAD:
117
+ processor = AutoProcessor.from_pretrained(model_id, use_auth_token=True)
118
+ model = Idefics3ForConditionalGeneration.from_pretrained(
119
+ model_id, device_map=device, torch_dtype=torch.bfloat16, use_auth_token=True
120
+ )
121
  if not torch.cuda.is_available():
122
  model = model.to(device)
123