M4xjunior commited on
Commit
10f485f
·
verified ·
1 Parent(s): 94e1007

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -21
app.py CHANGED
@@ -1,23 +1,3 @@
1
- ABOUT = """
2
- # Fast Whisper Turbo ⚡
3
-
4
- Ultra-fast Whisper V3 Turbo inference, with enhancements sourced from [insanely-fast-whisper](https://github.com/Vaibhavs10/insanely-fast-whisper).
5
- """
6
-
7
- CREDITS = """
8
- ## Credits
9
-
10
- This project was made possible through the work of several other projects:
11
-
12
- - [insanely-fast-whisper](https://github.com/Vaibhavs10/insanely-fast-whisper)
13
- """
14
-
15
- import subprocess
16
- subprocess.run(
17
- "pip install flash-attn --no-build-isolation",
18
- env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
19
- shell=True,
20
- ) # https://huggingface.co/spaces/zero-gpu-explorers/README/discussions/75#666e4681303f0a5d67175a90
21
  import gradio as gr
22
  from transformers import pipeline
23
  import torch
@@ -41,7 +21,7 @@ def transcribe(audio, task):
41
  return_timestamps="word"
42
  )
43
  gr.Info("Finished transcription task")
44
- return outputs['text'].strip()
45
 
46
  with gr.Blocks() as demo:
47
  gr.Markdown(ABOUT)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
  import torch
 
21
  return_timestamps="word"
22
  )
23
  gr.Info("Finished transcription task")
24
+ return outputs
25
 
26
  with gr.Blocks() as demo:
27
  gr.Markdown(ABOUT)