File size: 276 Bytes
65b07e7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr

cnt = 0

def test():
    cnt += 1
    return f'triggered!{cnt}'


with gr.Blocks() as demo:
    sketch_pad = gr.ImageEditor(type="pil")
    output_text = gr.Textbox(label='Output Text')
    sketch_pad.change(test, outputs=[output_text])
    
demo.launch()