hubsnippetai commited on
Commit
d4a9354
Β·
verified Β·
1 Parent(s): b78dadc

Update app.py

Browse files

corrected malformed transcribe_and_analyze outputs

Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -22,14 +22,8 @@ def run_gradio():
22
 
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,6 +34,6 @@ def run_gradio():
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)
 
22
 
23
  word_count = len(transcript.split())
24
  char_count = len(transcript.replace(" ", ""))
 
 
 
 
 
 
25
 
26
+ return transcript, word_count, char_count
27
 
28
  # Gradio UI
29
  with gr.Blocks(title="Whisper Agentic Transcriber") as demo:
 
34
  word_count = gr.Number(label="πŸ“ Word Count")
35
  char_count = gr.Number(label="πŸ”‘ Character Count")
36
 
37
+ btn.click(fn=transcribe_and_analyze, inputs=audio, outputs=[transcript, word_count, char_count])
38
 
39
  demo.launch(server_name="0.0.0.0", server_port=7860, share=True)