Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
import os
|
| 3 |
os.system('git clone https://github.com/ggerganov/whisper.cpp.git')
|
| 4 |
os.system('make -C ./whisper.cpp')
|
| 5 |
-
MODELS_TO_DOWNLOAD = ['tiny', 'medium'] # ['tiny', 'small', 'base', 'medium', 'large']
|
| 6 |
|
| 7 |
for model_name in MODELS_TO_DOWNLOAD:
|
| 8 |
os.system(f'bash ./whisper.cpp/models/download-ggml-model.sh {model_name}')
|
|
@@ -24,9 +24,12 @@ import time
|
|
| 24 |
from pytube import YouTube
|
| 25 |
import torch
|
| 26 |
|
| 27 |
-
INTRO_MSG = '#### There are many not very widely spoken languages for which it is quite hard to find learning materials, especially well dubbed videos.
|
| 28 |
-
This tool will hopefully generate subtitles so you can watch the video of your target language with corresponding subs. At least for me this is nice tool
|
| 29 |
-
to practice both listening and reading skills
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
whisper_models = MODELS_TO_DOWNLOAD #["medium"]#["base", "small", "medium", "large", "base.en"]
|
| 32 |
|
|
|
|
| 2 |
import os
|
| 3 |
os.system('git clone https://github.com/ggerganov/whisper.cpp.git')
|
| 4 |
os.system('make -C ./whisper.cpp')
|
| 5 |
+
MODELS_TO_DOWNLOAD = ['base', 'tiny', 'medium'] # ['tiny', 'small', 'base', 'medium', 'large']
|
| 6 |
|
| 7 |
for model_name in MODELS_TO_DOWNLOAD:
|
| 8 |
os.system(f'bash ./whisper.cpp/models/download-ggml-model.sh {model_name}')
|
|
|
|
| 24 |
from pytube import YouTube
|
| 25 |
import torch
|
| 26 |
|
| 27 |
+
INTRO_MSG = '''#### <p>There are many not very widely spoken languages for which it is quite hard to find learning materials, especially well dubbed videos.
|
| 28 |
+
This tool will hopefully generate subtitles so you can watch the video of your target language with corresponding subs. At least for me this is nice tool
|
| 29 |
+
to practice both listening and reading skills.
|
| 30 |
+
<p>Speech Recognition is based on models from [OpenAI Whisper](https://github.com/openai/whisper)
|
| 31 |
+
<p> This space is using c++ implementation by https://github.com/ggerganov/whisper.cpp
|
| 32 |
+
'''
|
| 33 |
|
| 34 |
whisper_models = MODELS_TO_DOWNLOAD #["medium"]#["base", "small", "medium", "large", "base.en"]
|
| 35 |
|