Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
|
@@ -19,9 +19,9 @@ r_model = T5ForMultimodalGeneration.from_pretrained(rationale_model_dir, patch_s
|
|
| 19 |
|
| 20 |
def inference_chat(input_image,input_text):
|
| 21 |
with torch.no_grad():
|
| 22 |
-
print(input_image)
|
| 23 |
-
img = Image.open(input_image).convert("RGB")
|
| 24 |
-
input = transform(
|
| 25 |
out = vit_model.forward_features(input)
|
| 26 |
image_features = out.detach()
|
| 27 |
|
|
|
|
| 19 |
|
| 20 |
def inference_chat(input_image,input_text):
|
| 21 |
with torch.no_grad():
|
| 22 |
+
# print(input_image)
|
| 23 |
+
# img = Image.open(input_image).convert("RGB")
|
| 24 |
+
input = transform(input_image).unsqueeze(0)
|
| 25 |
out = vit_model.forward_features(input)
|
| 26 |
image_features = out.detach()
|
| 27 |
|