Update main.py
Browse files
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():
|