m7mdal7aj commited on
Commit
58e3cb5
1 Parent(s): 16659b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -3,6 +3,7 @@ import torch
3
  import bitsandbytes
4
  import accelerate
5
  import scipy
 
6
 
7
  from transformers import Blip2Processor, Blip2ForConditionalGeneration
8
 
@@ -20,6 +21,8 @@ def answer_question(image, question, model, processor):
20
 
21
 
22
  image = Image.open(image).convert('RGB')
 
 
23
 
24
  inputs = processor(image, question, return_tensors="pt").to("cuda", torch.float16)
25
 
 
3
  import bitsandbytes
4
  import accelerate
5
  import scipy
6
+ from PIL import Image
7
 
8
  from transformers import Blip2Processor, Blip2ForConditionalGeneration
9
 
 
21
 
22
 
23
  image = Image.open(image).convert('RGB')
24
+
25
+
26
 
27
  inputs = processor(image, question, return_tensors="pt").to("cuda", torch.float16)
28