oscmansan commited on
Commit
38f62a2
1 Parent(s): f4927ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,11 +7,11 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
7
 
8
  model = torch.hub.load('mair-lab/mapl', 'mapl')
9
  model.eval()
10
- model.to(device, torch.bfloat16)
11
 
12
 
13
  def predict(image: Image.Image, question: str) -> str:
14
- pixel_values = model.image_transform(image).unsqueeze(0).to(device, torch.bfloat16)
15
 
16
  input_ids = None
17
  if question:
 
7
 
8
  model = torch.hub.load('mair-lab/mapl', 'mapl')
9
  model.eval()
10
+ model.to(device, torch.float16)
11
 
12
 
13
  def predict(image: Image.Image, question: str) -> str:
14
+ pixel_values = model.image_transform(image).unsqueeze(0).to(device, torch.float16)
15
 
16
  input_ids = None
17
  if question: