oshita-n commited on
Commit
b1a1700
1 Parent(s): 48de2f9
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ def process(input_image, prompt):
9
 
10
  model, vis_processors, txt_processors = load_model_and_preprocess(name="blip_feature_extractor", model_type="base", is_eval=True, device=device)
11
 
12
- input_image = input_image.resize((256, 256), Image.ANTIALIAS)
13
  image = vis_processors["eval"](input_image).unsqueeze(0).to(device)
14
  text_input = txt_processors["eval"](prompt)
15
  sample = {"image": image, "text_input": [text_input]}
 
9
 
10
  model, vis_processors, txt_processors = load_model_and_preprocess(name="blip_feature_extractor", model_type="base", is_eval=True, device=device)
11
 
12
+ input_image = input_image.resize((256, 256), Image.LANCZOS)
13
  image = vis_processors["eval"](input_image).unsqueeze(0).to(device)
14
  text_input = txt_processors["eval"](prompt)
15
  sample = {"image": image, "text_input": [text_input]}