Spaces:
Build error
Build error
Update app.py
Browse files
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 |
-
|
| 143 |
-
|
| 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 |
-
|
| 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 |
-
|
| 168 |
outputs=[summary_output]
|
| 169 |
)
|
| 170 |
|
| 171 |
answer_button.click(
|
| 172 |
answer_question,
|
| 173 |
-
inputs=[
|
| 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 |
|