ManishThota commited on
Commit
a6c6902
·
verified ·
1 Parent(s): a4115fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -17,7 +17,7 @@ def predict_answer(image, question, max_tokens):
17
  text = f"A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: <image>\n{question}? ASSISTANT:"
18
  image = image.convert("RGB")
19
 
20
- input_ids = tokenizer(text, return_tensors='pt').input_ids.to("cuda:0", torch.float16)
21
  image_tensor = model.image_preprocess(image)
22
 
23
  #Generate the answer
 
17
  text = f"A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: <image>\n{question}? ASSISTANT:"
18
  image = image.convert("RGB")
19
 
20
+ input_ids = tokenizer(text, return_tensors='pt').input_ids
21
  image_tensor = model.image_preprocess(image)
22
 
23
  #Generate the answer