Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -142,6 +142,8 @@ with gr.Blocks(title="WhisperNER v1") as demo:
|
|
142 |
with gr.Column() as col2:
|
143 |
label_input = gr.Textbox(label="Entity Labels")
|
144 |
|
|
|
|
|
145 |
gr.Markdown("## Output")
|
146 |
|
147 |
with gr.Row() as row3:
|
@@ -150,7 +152,6 @@ with gr.Blocks(title="WhisperNER v1") as demo:
|
|
150 |
with gr.Row() as row4:
|
151 |
highlighted_text_output = gr.HighlightedText(label="Predicted Highlighted Entities")
|
152 |
|
153 |
-
submit_btn = gr.Button("Submit")
|
154 |
examples = gr.Examples(
|
155 |
examples,
|
156 |
fn=transcribe_and_recognize_entities,
|
@@ -166,5 +167,10 @@ with gr.Blocks(title="WhisperNER v1") as demo:
|
|
166 |
inputs=[audio_input, label_input],
|
167 |
outputs=[transcript_output, highlighted_text_output],
|
168 |
)
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
demo.launch()
|
|
|
142 |
with gr.Column() as col2:
|
143 |
label_input = gr.Textbox(label="Entity Labels")
|
144 |
|
145 |
+
submit_btn = gr.Button("Submit")
|
146 |
+
|
147 |
gr.Markdown("## Output")
|
148 |
|
149 |
with gr.Row() as row3:
|
|
|
152 |
with gr.Row() as row4:
|
153 |
highlighted_text_output = gr.HighlightedText(label="Predicted Highlighted Entities")
|
154 |
|
|
|
155 |
examples = gr.Examples(
|
156 |
examples,
|
157 |
fn=transcribe_and_recognize_entities,
|
|
|
167 |
inputs=[audio_input, label_input],
|
168 |
outputs=[transcript_output, highlighted_text_output],
|
169 |
)
|
170 |
+
submit_btn.click(
|
171 |
+
fn=transcribe_and_recognize_entities,
|
172 |
+
inputs=[audio_input, label_input],
|
173 |
+
outputs=[transcript_output, highlighted_text_output],
|
174 |
+
)
|
175 |
|
176 |
demo.launch()
|