Spaces:
Build error
Build error
oliverlevn
commited on
Commit
·
bb029d9
1
Parent(s):
3a42afa
remove resize
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ def predict(img):
|
|
77 |
# Start the timer
|
78 |
start_time = time.time()
|
79 |
device = 'cpu'
|
80 |
-
transform = T.Compose([T.ToPILImage(),
|
81 |
image_tensor = transform(img).to(device)
|
82 |
image_tensor = image_tensor.unsqueeze(0)
|
83 |
faster_rcnn.eval()
|
|
|
77 |
# Start the timer
|
78 |
start_time = time.time()
|
79 |
device = 'cpu'
|
80 |
+
transform = T.Compose([T.ToPILImage(),T.ToTensor()])
|
81 |
image_tensor = transform(img).to(device)
|
82 |
image_tensor = image_tensor.unsqueeze(0)
|
83 |
faster_rcnn.eval()
|