Spaces:
Sleeping
Sleeping
Commit
·
5141811
1
Parent(s):
e8ef14f
fix: return uint8 type to avoid deprecation warning
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ LEARNER = load_learner(MODEL_PATH / 'car-segmentation_v1.pkl')
|
|
42 |
def segment_image(image):
|
43 |
image = PILImage.create(image)
|
44 |
prediction, _, _ = LEARNER.predict(image)
|
45 |
-
return numpy.array(prediction)
|
46 |
|
47 |
demo = gradio.Interface(
|
48 |
segment_image,
|
|
|
42 |
def segment_image(image):
|
43 |
image = PILImage.create(image)
|
44 |
prediction, _, _ = LEARNER.predict(image)
|
45 |
+
return numpy.array(prediction, dtype=numpy.uint8)
|
46 |
|
47 |
demo = gradio.Interface(
|
48 |
segment_image,
|