Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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()
|