Spaces:
Runtime error
Runtime error
datnth1709
commited on
Commit
·
8e6bdf2
1
Parent(s):
2f12a3f
update inference
Browse files- app.py +2 -4
- en_speech_01.wav +0 -0
- en_speech_02.wav +0 -0
- en_speech_03.wav +0 -0
- requirements.txt +4 -3
app.py
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
import nltk
|
3 |
import librosa
|
4 |
-
|
5 |
-
from transformers import pipeline, TranslationPipeline, AutoTokenizer, TranslationPipeline
|
6 |
-
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC, Wav2Vec2Tokenizer
|
7 |
from transformers.file_utils import cached_path, hf_bucket_url
|
8 |
import os, zipfile
|
|
|
9 |
from datasets import load_dataset
|
10 |
import torch
|
11 |
import kenlm
|
@@ -126,5 +125,4 @@ with gr.TabItem("Vi-En Realtime Translation"):
|
|
126 |
"state",
|
127 |
|
128 |
],
|
129 |
-
examples=vi_example_voice,
|
130 |
live=True).launch()
|
|
|
1 |
import gradio as gr
|
2 |
import nltk
|
3 |
import librosa
|
4 |
+
from transformers import pipeline
|
|
|
|
|
5 |
from transformers.file_utils import cached_path, hf_bucket_url
|
6 |
import os, zipfile
|
7 |
+
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC, Wav2Vec2Tokenizer
|
8 |
from datasets import load_dataset
|
9 |
import torch
|
10 |
import kenlm
|
|
|
125 |
"state",
|
126 |
|
127 |
],
|
|
|
128 |
live=True).launch()
|
en_speech_01.wav
DELETED
Binary file (816 kB)
|
|
en_speech_02.wav
DELETED
Binary file (238 kB)
|
|
en_speech_03.wav
DELETED
Binary file (751 kB)
|
|
requirements.txt
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
torch==1.9.0
|
2 |
torchaudio==0.9.0
|
3 |
-
transformers==4.9.2
|
4 |
-
transformers[sentencepiece]
|
5 |
datasets==1.11.0
|
6 |
pyctcdecode==v0.1.0
|
7 |
speechbrain
|
@@ -13,4 +12,6 @@ ffmpeg-python
|
|
13 |
gradio
|
14 |
nltk
|
15 |
librosa
|
16 |
-
|
|
|
|
|
|
1 |
torch==1.9.0
|
2 |
torchaudio==0.9.0
|
3 |
+
transformers==4.9.2
|
|
|
4 |
datasets==1.11.0
|
5 |
pyctcdecode==v0.1.0
|
6 |
speechbrain
|
|
|
12 |
gradio
|
13 |
nltk
|
14 |
librosa
|
15 |
+
transformers
|
16 |
+
transformers[sentencepiece]
|
17 |
+
https://github.com/kpu/kenlm/archive/master.zip
|