cINAWGD commited on
Commit
2d907c4
·
verified ·
1 Parent(s): 12b6af6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -55,7 +55,7 @@ async def detect_nsfw(
55
  f.write(response.content)
56
 
57
  # Open and process the image
58
- img = Image.open(temp_filename)
59
 
60
  # Perform inference
61
  with torch.no_grad():
 
55
  f.write(response.content)
56
 
57
  # Open and process the image
58
+ img = Image.open(temp_filename).convert("RGB")
59
 
60
  # Perform inference
61
  with torch.no_grad():