Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
|
|
|
3 |
import torch
|
4 |
import librosa
|
5 |
from glob import glob
|
@@ -28,6 +29,7 @@ tokenizer_ner = AutoTokenizer.from_pretrained(model_name)
|
|
28 |
model_ner = AutoModelForTokenClassification.from_pretrained(model_name)
|
29 |
predict_ner = TokenClassificationPipeline(model=model_ner, tokenizer=tokenizer_ner)
|
30 |
|
|
|
31 |
examples = sorted(glob(os.path.join(EXAMPLE_DIR, '*.wav')))
|
32 |
|
33 |
def transcribe(audio_path):
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
import os
|
4 |
import torch
|
5 |
import librosa
|
6 |
from glob import glob
|
|
|
29 |
model_ner = AutoModelForTokenClassification.from_pretrained(model_name)
|
30 |
predict_ner = TokenClassificationPipeline(model=model_ner, tokenizer=tokenizer_ner)
|
31 |
|
32 |
+
EXAMPLE_DIR = './'
|
33 |
examples = sorted(glob(os.path.join(EXAMPLE_DIR, '*.wav')))
|
34 |
|
35 |
def transcribe(audio_path):
|