avfranco commited on
Commit
870e59b
1 Parent(s): ee0d4ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -58,6 +58,7 @@ with gr.Blocks() as transcriberUI:
58
  ask_question = gr.Textbox(label="Ask a question", visible=False)
59
  response_output = gr.Textbox(label="Response", visible=False)
60
  submit_question = gr.Button("Submit question", visible=False)
 
61
  clear_button = gr.ClearButton([transcribe,response_output,inp, ask_question])
62
 
63
  def ask_question_callback(transcription,question):
@@ -68,7 +69,9 @@ with gr.Blocks() as transcriberUI:
68
 
69
  return response
70
 
71
- inp.upload(audio_transcribe, inputs=inp, outputs=[transcribe,ask_question,submit_question, response_output])
 
 
72
  clear_button.click(hidden_ask_question,outputs=[ask_question,response_output,submit_question])
73
 
74
 
 
58
  ask_question = gr.Textbox(label="Ask a question", visible=False)
59
  response_output = gr.Textbox(label="Response", visible=False)
60
  submit_question = gr.Button("Submit question", visible=False)
61
+ submit_button = gr.Button("Transcribe to Chat", variant='primary')
62
  clear_button = gr.ClearButton([transcribe,response_output,inp, ask_question])
63
 
64
  def ask_question_callback(transcription,question):
 
69
 
70
  return response
71
 
72
+ #inp.upload(audio_transcribe, inputs=inp, outputs=[transcribe,ask_question,submit_question, response_output])
73
+ submit_button.click(ask_question_callback, inputs=inp, outputs=[transcribe,ask_question,submit_question, response_output])
74
+ submit_question.click(ask_question_callback, outputs=[response_output], inputs=[transcribe, ask_question])
75
  clear_button.click(hidden_ask_question,outputs=[ask_question,response_output,submit_question])
76
 
77