Kr08 commited on
Commit
470c6fe
·
verified ·
1 Parent(s): b505bcb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -138,9 +138,9 @@ with gr.Blocks() as iface:
138
  process_button = gr.Button("Process Audio")
139
 
140
  with gr.Column():
141
- ASR_RESULT = gr.Textbox(label="Output")
142
- # transcription_output = gr.Textbox(label="Transcription/Translation", lines=10)
143
- # full_text_output = gr.Textbox(label="Full Text", lines=5)
144
 
145
  with gr.Row():
146
  with gr.Column():
@@ -156,21 +156,21 @@ with gr.Blocks() as iface:
156
  process_button.click(
157
  process_audio,
158
  inputs=[audio_input, translate_checkbox],
159
- # outputs=[transcription_output, full_text_output]
160
- outputs=[ASR_RESULT]
161
  )
162
  # logger.info(f"{ASR_RESULT}")
163
  # translated_text = ''.join(item['translated'] for item in ASR_RESULT if 'translated' in item)
164
  summarize_button.click(
165
  summarize_text,
166
- inputs=[ASR_RESULT],
167
- # inputs=[full_text_output],
168
  outputs=[summary_output]
169
  )
170
 
171
  answer_button.click(
172
  answer_question,
173
- inputs=[ASR_RESULT, question_input],
174
  outputs=[answer_output]
175
  )
176
 
 
138
  process_button = gr.Button("Process Audio")
139
 
140
  with gr.Column():
141
+ # ASR_RESULT = gr.Textbox(label="Output")
142
+ full_text_output = gr.Textbox(label="Full Text", lines=5)
143
+ translation_output = gr.Textbox(label="Transcription/Translation", lines=10)
144
 
145
  with gr.Row():
146
  with gr.Column():
 
156
  process_button.click(
157
  process_audio,
158
  inputs=[audio_input, translate_checkbox],
159
+ outputs=[translation_output, full_text_output]
160
+ # outputs=[ASR_RESULT]
161
  )
162
  # logger.info(f"{ASR_RESULT}")
163
  # translated_text = ''.join(item['translated'] for item in ASR_RESULT if 'translated' in item)
164
  summarize_button.click(
165
  summarize_text,
166
+ # inputs=[ASR_RESULT],
167
+ inputs=[translation_output],
168
  outputs=[summary_output]
169
  )
170
 
171
  answer_button.click(
172
  answer_question,
173
+ inputs=[translation_output, question_input],
174
  outputs=[answer_output]
175
  )
176