Spaces:
Sleeping
Sleeping
iamomtiwari
commited on
Commit
•
b28200c
1
Parent(s):
bb9954b
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ def predict(image):
|
|
14 |
if isinstance(image, str):
|
15 |
image = Image.open(image)
|
16 |
|
17 |
-
# Preprocess the input image using the processor
|
18 |
-
inputs = processor(images=image, return_tensors="pt")
|
19 |
|
20 |
# Get the model's predictions
|
21 |
with torch.no_grad():
|
|
|
14 |
if isinstance(image, str):
|
15 |
image = Image.open(image)
|
16 |
|
17 |
+
# Preprocess the input image using the processor, with padding enabled
|
18 |
+
inputs = processor(images=image, return_tensors="pt", padding=True)
|
19 |
|
20 |
# Get the model's predictions
|
21 |
with torch.no_grad():
|