spuun commited on
Commit
cec0a27
1 Parent(s): c230ae8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -44,7 +44,7 @@ nsfw_tm = _open_onnx_model("timm.onnx")
44
 
45
  def launch(img):
46
  weight = 0
47
- img = Image.open(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_})
 
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_})