amirgame197 commited on
Commit
8637ba8
1 Parent(s): 2fcbf48

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from nudenet import NudeDetector
3
+
4
+ def process(input_img):
5
+ detector = NudeDetector(model_path="640m.onnx", inference_resolution=640)
6
+ converted = detector.censor(input_img)
7
+ return converted
8
+
9
+ iface = gr.Interface(fn=process,inputs="image", outputs="image")
10
+ iface.launch()