fffiloni commited on
Commit
cfd6aa4
1 Parent(s): 6c6ac2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -8,6 +8,7 @@ with gr.Blocks() as demo:
8
  with gr.Row():
9
  with gr.Column():
10
  audio_in = gr.Audio(label="Audio Component", source="microphone", type="filepath")
 
11
  hidden_in = gr.Textbox(value="HIDDEN TEXT", visible=False)
12
  submit_btn : gr.Button("Submit")
13
  result = gr.Textbox(label="Result")
@@ -18,5 +19,11 @@ with gr.Blocks() as demo:
18
  outputs = [result]
19
  )
20
 
 
 
 
 
 
 
21
  demo.queue().launch()
22
 
 
8
  with gr.Row():
9
  with gr.Column():
10
  audio_in = gr.Audio(label="Audio Component", source="microphone", type="filepath")
11
+ image_in = gr.Image(label="Image Component", source="upload", type="filepath")
12
  hidden_in = gr.Textbox(value="HIDDEN TEXT", visible=False)
13
  submit_btn : gr.Button("Submit")
14
  result = gr.Textbox(label="Result")
 
19
  outputs = [result]
20
  )
21
 
22
+ image_in.clear(
23
+ fn = triggered_by_clear_event,
24
+ inputs = [hidden_in],
25
+ outputs = [result]
26
+ )
27
+
28
  demo.queue().launch()
29