Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ nsfw_tm = _open_onnx_model("timm.onnx")
|
|
44 |
|
45 |
def launch(img):
|
46 |
weight = 0
|
47 |
-
img =
|
48 |
tm_image = load_image(img, mode='RGB')
|
49 |
tm_input_ = _img_encode(tm_image, size=(256, 256))[None, ...]
|
50 |
tm_output, = nsfw_tm.run(['output'], {'input': tm_input_})
|
|
|
44 |
|
45 |
def launch(img):
|
46 |
weight = 0
|
47 |
+
img = img.convert('RGB')
|
48 |
tm_image = load_image(img, mode='RGB')
|
49 |
tm_input_ = _img_encode(tm_image, size=(256, 256))[None, ...]
|
50 |
tm_output, = nsfw_tm.run(['output'], {'input': tm_input_})
|