Update app.py
Browse files
app.py
CHANGED
|
@@ -64,7 +64,7 @@ class ImageCaptioningTool(Tool):
|
|
| 64 |
device=0 if torch.cuda.is_available() else -1
|
| 65 |
)
|
| 66 |
|
| 67 |
-
def
|
| 68 |
if not isinstance(image, Image.Image):
|
| 69 |
image = Image.open(BytesIO(image))
|
| 70 |
result = self.captioner(image)
|
|
|
|
| 64 |
device=0 if torch.cuda.is_available() else -1
|
| 65 |
)
|
| 66 |
|
| 67 |
+
def forward(self, image, question):
|
| 68 |
if not isinstance(image, Image.Image):
|
| 69 |
image = Image.open(BytesIO(image))
|
| 70 |
result = self.captioner(image)
|