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

Update app.py

Browse files

returned value modified

Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -23,11 +23,13 @@ def run_gradio():
23
  word_count = len(transcript.split())
24
  char_count = len(transcript.replace(" ", ""))
25
 
26
- return {
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=[transcript, word_count, char_count])
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)