Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ def inference(audio):
|
|
81 |
# print(result.text)
|
82 |
getText = generator(result.text, max_new_tokens=10, num_return_sequences=5)
|
83 |
pprint(getText)
|
84 |
-
return result.text, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
85 |
|
86 |
|
87 |
|
@@ -241,6 +241,8 @@ with block:
|
|
241 |
|
242 |
btn = gr.Button("Transcribe")
|
243 |
text = gr.Textbox(show_label=False, elem_id="result-textarea")
|
|
|
|
|
244 |
with gr.Group(elem_id="share-btn-container"):
|
245 |
community_icon = gr.HTML(community_icon_html, visible=False)
|
246 |
loading_icon = gr.HTML(loading_icon_html, visible=False)
|
@@ -249,7 +251,7 @@ with block:
|
|
249 |
|
250 |
|
251 |
|
252 |
-
btn.click(inference, inputs=[audio], outputs=[text, community_icon, loading_icon, share_button])
|
253 |
share_button.click(None, [], [], _js=share_js)
|
254 |
|
255 |
gr.HTML('''
|
|
|
81 |
# print(result.text)
|
82 |
getText = generator(result.text, max_new_tokens=10, num_return_sequences=5)
|
83 |
pprint(getText)
|
84 |
+
return result.text,getText, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
85 |
|
86 |
|
87 |
|
|
|
241 |
|
242 |
btn = gr.Button("Transcribe")
|
243 |
text = gr.Textbox(show_label=False, elem_id="result-textarea")
|
244 |
+
# added rText below
|
245 |
+
rText = gr.Textbox(show_label=False, elem_id="result-textarea")
|
246 |
with gr.Group(elem_id="share-btn-container"):
|
247 |
community_icon = gr.HTML(community_icon_html, visible=False)
|
248 |
loading_icon = gr.HTML(loading_icon_html, visible=False)
|
|
|
251 |
|
252 |
|
253 |
|
254 |
+
btn.click(inference, inputs=[audio], outputs=[text, rText, community_icon, loading_icon, share_button])
|
255 |
share_button.click(None, [], [], _js=share_js)
|
256 |
|
257 |
gr.HTML('''
|