Spaces:
Runtime error
Runtime error
Hector Lopez
commited on
Commit
·
9c94b10
1
Parent(s):
284fe0a
Fix
Browse files
model.py
CHANGED
@@ -40,7 +40,8 @@ def predict(model, image):
|
|
40 |
#img = PIL.Image.open(image)
|
41 |
img = PIL.Image.open(BytesIO(image))
|
42 |
img = np.array(img)
|
43 |
-
|
|
|
44 |
class_map = ClassMap(classes=['Waste'])
|
45 |
transforms = tfms.A.Adapter([
|
46 |
*tfms.A.resize_and_pad(512),
|
|
|
40 |
#img = PIL.Image.open(image)
|
41 |
img = PIL.Image.open(BytesIO(image))
|
42 |
img = np.array(img)
|
43 |
+
img = PIL.Image.fromarray(img)
|
44 |
+
|
45 |
class_map = ClassMap(classes=['Waste'])
|
46 |
transforms = tfms.A.Adapter([
|
47 |
*tfms.A.resize_and_pad(512),
|