Spaces:
Running
Running
File size: 445 Bytes
3c84539 37a17ac 3c84539 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import fn
import gradio as gr
fn.load_model()
with gr.Blocks() as demo:
title = gr.Markdown('# Safety Checker')
with gr.Row():
src_image = gr.Image(label="Source", sources="upload", interactive=True, type="pil")
result = gr.Textbox(label="Has NSFW", interactive=False)
src_image.change(
fn=fn.check,
inputs=[src_image],
outputs=[result],
)
if __name__ == '__main__':
demo.launch()
|