Spaces:
Runtime error
Runtime error
Hector Lopez
commited on
Commit
·
284fe0a
1
Parent(s):
db41ce0
Fix
Browse files
model.py
CHANGED
@@ -39,6 +39,7 @@ def get_checkpoint(checkpoint_path):
|
|
39 |
def predict(model, image):
|
40 |
#img = PIL.Image.open(image)
|
41 |
img = PIL.Image.open(BytesIO(image))
|
|
|
42 |
print(img.shape)
|
43 |
class_map = ClassMap(classes=['Waste'])
|
44 |
transforms = tfms.A.Adapter([
|
|
|
39 |
def predict(model, image):
|
40 |
#img = PIL.Image.open(image)
|
41 |
img = PIL.Image.open(BytesIO(image))
|
42 |
+
img = np.array(img)
|
43 |
print(img.shape)
|
44 |
class_map = ClassMap(classes=['Waste'])
|
45 |
transforms = tfms.A.Adapter([
|