Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ def classify_continuous(audio):
|
|
54 |
text_results += punc.punctuate(_result)[0]
|
55 |
|
56 |
out_prob, score, index, text_lab = classifier.classify_batch(signal1)
|
57 |
-
return text_results, out_prob.squeeze(0).numpy(), text_lab[-1]
|
58 |
|
59 |
|
60 |
#########################################θ§ι’ι¨ε###################################
|
@@ -93,10 +93,10 @@ with gr.Blocks(css="app.css") as video:
|
|
93 |
)
|
94 |
output_audio=gr.Audio(interactive=False)
|
95 |
audio_test_button=gr.Button("εζθ―ι³")
|
96 |
-
button2=gr.Button("η΄ζ₯θ°εθ·―εΎεζ")
|
97 |
out1=gr.Textbox(label="θ―ι³εζη»ζ")
|
98 |
out2=gr.Textbox(label="ι³ι’ζ
ζθ―ε«1")
|
99 |
out3=gr.Textbox(label="ι³ι’ζ
ζθ―ε«2")
|
|
|
100 |
gr.Examples(
|
101 |
[
|
102 |
"videos/video1.mp4",
|
@@ -132,12 +132,7 @@ with gr.Blocks(css="app.css") as video:
|
|
132 |
audio_test_button.click(
|
133 |
fn=classify_continuous,
|
134 |
inputs=output_audio,
|
135 |
-
outputs=[out1,out2,out3]
|
136 |
-
)
|
137 |
-
button2.click(
|
138 |
-
fn=classify_continuous,
|
139 |
-
inputs=["audio.wav"],
|
140 |
-
outputs=[out1,out2,out3]
|
141 |
)
|
142 |
|
143 |
####################################
|
|
|
54 |
text_results += punc.punctuate(_result)[0]
|
55 |
|
56 |
out_prob, score, index, text_lab = classifier.classify_batch(signal1)
|
57 |
+
return text_results, out_prob.squeeze(0).numpy(), text_lab[-1], Audio
|
58 |
|
59 |
|
60 |
#########################################θ§ι’ι¨ε###################################
|
|
|
93 |
)
|
94 |
output_audio=gr.Audio(interactive=False)
|
95 |
audio_test_button=gr.Button("εζθ―ι³")
|
|
|
96 |
out1=gr.Textbox(label="θ―ι³εζη»ζ")
|
97 |
out2=gr.Textbox(label="ι³ι’ζ
ζθ―ε«1")
|
98 |
out3=gr.Textbox(label="ι³ι’ζ
ζθ―ε«2")
|
99 |
+
internal_audio=gr.Audio(interactive=False)
|
100 |
gr.Examples(
|
101 |
[
|
102 |
"videos/video1.mp4",
|
|
|
132 |
audio_test_button.click(
|
133 |
fn=classify_continuous,
|
134 |
inputs=output_audio,
|
135 |
+
outputs=[out1,out2,out3,internal_audio]
|
|
|
|
|
|
|
|
|
|
|
136 |
)
|
137 |
|
138 |
####################################
|