File size: 458 Bytes
9b3b1b4
dcbc4e3
 
9b3b1b4
dcbc4e3
 
 
 
 
 
 
 
9b3b1b4
dcbc4e3
 
 
 
9b3b1b4
 
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('# katanuki')
    with gr.Row():
        src_image = gr.Image(label="Source", sources="upload", interactive=True, type="pil")
        dst_image = gr.Image(label="Result", interactive=False, type="numpy")

    src_image.change(
        fn=fn.animeseg,
        inputs=[src_image],
        outputs=[dst_image],
    )

if __name__ == '__main__':
    demo.launch()