Spaces:
Runtime error
Runtime error
codefusser
commited on
Commit
·
69ae2a6
1
Parent(s):
b7416a9
modified the transcribe analyzer function
Browse files
app.py
CHANGED
@@ -16,18 +16,15 @@ def run_gradio():
|
|
16 |
transcriber = pipeline(model="openai/whisper-large-v2", return_timestamps=True)
|
17 |
|
18 |
# Agentic function
|
|
|
19 |
def transcribe_and_analyze(audio):
|
20 |
result = transcriber(audio)
|
21 |
transcript = result["text"]
|
22 |
|
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:
|
|
|
16 |
transcriber = pipeline(model="openai/whisper-large-v2", return_timestamps=True)
|
17 |
|
18 |
# Agentic function
|
19 |
+
|
20 |
def transcribe_and_analyze(audio):
|
21 |
result = transcriber(audio)
|
22 |
transcript = result["text"]
|
23 |
|
24 |
word_count = len(transcript.split())
|
25 |
char_count = len(transcript.replace(" ", ""))
|
26 |
+
|
27 |
+
return transcript, word_count, char_count
|
|
|
|
|
|
|
|
|
28 |
|
29 |
# Gradio UI
|
30 |
with gr.Blocks(title="Whisper Agentic Transcriber") as demo:
|