sotirios-slv commited on
Commit
4f8f2e4
·
1 Parent(s): a621d2a

Feat: added state to hold selected quote

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -90,7 +90,7 @@ with gr.Blocks() as demo:
90
  rand_btn.click(fn=select_quote,inputs=[],outputs=quote)
91
 
92
  with gr.Row():
93
- inp = [gr.Audio(sources='microphone',type="filepath"),selected_quote],
94
 
95
  out_1 = gr.HighlightedText(
96
  label="WhisperDiff",
@@ -106,6 +106,6 @@ with gr.Blocks() as demo:
106
  color_map={"+": "green", "-": "blue"}
107
  )
108
  btn = gr.Button("Run")
109
- btn.click(fn=transcribe, inputs=inp, outputs=[out_1, out_2])
110
 
111
  demo.launch()
 
90
  rand_btn.click(fn=select_quote,inputs=[],outputs=quote)
91
 
92
  with gr.Row():
93
+ mf_input = gr.Audio(sources='microphone',type="filepath"),
94
 
95
  out_1 = gr.HighlightedText(
96
  label="WhisperDiff",
 
106
  color_map={"+": "green", "-": "blue"}
107
  )
108
  btn = gr.Button("Run")
109
+ btn.click(fn=transcribe, inputs=[mf_input,selected_quote], outputs=[out_1, out_2])
110
 
111
  demo.launch()