oscmansan commited on
Commit
48dbbe4
1 Parent(s): 5652284

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def predict(image: Image.Image, question: str) -> str:
18
  text = f"Please answer the question. Question: {question} Answer:" if '?' in question else question
19
  input_ids = model.text_transform(text).input_ids.to(device)
20
 
21
- with torch.autocast(device_type=device, dtype=torch.float16):
22
  generated_ids = model.generate(
23
  pixel_values=pixel_values,
24
  input_ids=input_ids,
 
18
  text = f"Please answer the question. Question: {question} Answer:" if '?' in question else question
19
  input_ids = model.text_transform(text).input_ids.to(device)
20
 
21
+ with torch.autocast(device_type=device, dtype=torch.bfloat16):
22
  generated_ids = model.generate(
23
  pixel_values=pixel_values,
24
  input_ids=input_ids,