Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,7 +67,10 @@ carTransforms = transforms.Compose([transforms.Resize(224),
|
|
| 67 |
|
| 68 |
def classifyCar(im):
|
| 69 |
#im = Image.fromarray(im.astype('uint8'), 'RGB')
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
| 71 |
try:
|
| 72 |
with torch.no_grad():
|
| 73 |
outputs = predictor(im)
|
|
|
|
| 67 |
|
| 68 |
def classifyCar(im):
|
| 69 |
#im = Image.fromarray(im.astype('uint8'), 'RGB')
|
| 70 |
+
try:
|
| 71 |
+
im = cv2.imread(im)
|
| 72 |
+
except:
|
| 73 |
+
return im, {"error0": 0.5}
|
| 74 |
try:
|
| 75 |
with torch.no_grad():
|
| 76 |
outputs = predictor(im)
|