ImagineAI-Real commited on
Commit
afae23e
·
1 Parent(s): de18720

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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": f"data:image/png;base64,{encoded_image}"}
14
  )
15
  return resp.text
16
 
17
  iface = gr.Interface(
18
  fn=anti_nsfw,
19
- inputs="file",
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)."