Spaces:
Sleeping
Sleeping
Commit
·
afae23e
1
Parent(s):
de18720
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,13 +10,13 @@ def anti_nsfw(image):
|
|
| 10 |
encoded_image = encode_image(image)
|
| 11 |
resp = requests.get(
|
| 12 |
"https://4937ea62-c0b0-414f-afbc-53be1f5b0d06.id.repl.co/scan",
|
| 13 |
-
data={"base64":
|
| 14 |
)
|
| 15 |
return resp.text
|
| 16 |
|
| 17 |
iface = gr.Interface(
|
| 18 |
fn=anti_nsfw,
|
| 19 |
-
inputs=
|
| 20 |
outputs="text",
|
| 21 |
title="AntiNSFW",
|
| 22 |
description="Check if an image is safe for work (SFW) or not safe for work (NSFW)."
|
|
|
|
| 10 |
encoded_image = encode_image(image)
|
| 11 |
resp = requests.get(
|
| 12 |
"https://4937ea62-c0b0-414f-afbc-53be1f5b0d06.id.repl.co/scan",
|
| 13 |
+
data={"base64": encoded_image}
|
| 14 |
)
|
| 15 |
return resp.text
|
| 16 |
|
| 17 |
iface = gr.Interface(
|
| 18 |
fn=anti_nsfw,
|
| 19 |
+
inputs=gr.inputs.Image(),
|
| 20 |
outputs="text",
|
| 21 |
title="AntiNSFW",
|
| 22 |
description="Check if an image is safe for work (SFW) or not safe for work (NSFW)."
|