ManishThota
commited on
Commit
•
18da287
1
Parent(s):
48d243e
Update README.md
Browse files
README.md
CHANGED
@@ -51,7 +51,7 @@ def predict(question, image_path):
|
|
51 |
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:"
|
52 |
image = Image.open(image_path)
|
53 |
|
54 |
-
input_ids = tokenizer(text, return_tensors='pt').input_ids
|
55 |
image_tensor = model.image_preprocess(image)
|
56 |
|
57 |
#Generate the answer
|
|
|
51 |
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:"
|
52 |
image = Image.open(image_path)
|
53 |
|
54 |
+
input_ids = tokenizer(text, return_tensors='pt').input_ids.to('cuda')
|
55 |
image_tensor = model.image_preprocess(image)
|
56 |
|
57 |
#Generate the answer
|