Spaces:
Runtime error
Runtime error
fix
Browse files
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.
|
| 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]}
|