Spaces:
Runtime error
Runtime error
Update app.py
Browse filesreturned value modified
app.py
CHANGED
@@ -23,11 +23,13 @@ def run_gradio():
|
|
23 |
word_count = len(transcript.split())
|
24 |
char_count = len(transcript.replace(" ", ""))
|
25 |
|
26 |
-
|
27 |
"Transcript": transcript,
|
28 |
"Word Count": word_count,
|
29 |
"Character Count": char_count
|
30 |
}
|
|
|
|
|
31 |
|
32 |
# Gradio UI
|
33 |
with gr.Blocks(title="Whisper Agentic Transcriber") as demo:
|
@@ -38,6 +40,6 @@ def run_gradio():
|
|
38 |
word_count = gr.Number(label="π Word Count")
|
39 |
char_count = gr.Number(label="π‘ Character Count")
|
40 |
|
41 |
-
btn.click(fn=transcribe_and_analyze, inputs=audio, outputs=[
|
42 |
|
43 |
demo.launch(server_name="0.0.0.0", server_port=7860, share=True)
|
|
|
23 |
word_count = len(transcript.split())
|
24 |
char_count = len(transcript.replace(" ", ""))
|
25 |
|
26 |
+
word_describe = {
|
27 |
"Transcript": transcript,
|
28 |
"Word Count": word_count,
|
29 |
"Character Count": char_count
|
30 |
}
|
31 |
+
|
32 |
+
return word_describe
|
33 |
|
34 |
# Gradio UI
|
35 |
with gr.Blocks(title="Whisper Agentic Transcriber") as demo:
|
|
|
40 |
word_count = gr.Number(label="π Word Count")
|
41 |
char_count = gr.Number(label="π‘ Character Count")
|
42 |
|
43 |
+
btn.click(fn=transcribe_and_analyze, inputs=audio, outputs=[word_describe["Transcript"], word_describe["Word Count"], word_describe["Character Count"]])
|
44 |
|
45 |
demo.launch(server_name="0.0.0.0", server_port=7860, share=True)
|