Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,6 +27,8 @@ tokenizer_ner = AutoTokenizer.from_pretrained(model_name)
|
|
| 27 |
model_ner = AutoModelForTokenClassification.from_pretrained(model_name)
|
| 28 |
predict_ner = TokenClassificationPipeline(model=model_ner, tokenizer=tokenizer_ner)
|
| 29 |
|
|
|
|
|
|
|
| 30 |
def transcribe(audio_path):
|
| 31 |
|
| 32 |
speech_array, sampling_rate = librosa.load(audio_path, sr=16_000)
|
|
|
|
| 27 |
model_ner = AutoModelForTokenClassification.from_pretrained(model_name)
|
| 28 |
predict_ner = TokenClassificationPipeline(model=model_ner, tokenizer=tokenizer_ner)
|
| 29 |
|
| 30 |
+
examples = sorted(glob(os.path.join(EXAMPLE_DIR, '*.wav')))
|
| 31 |
+
|
| 32 |
def transcribe(audio_path):
|
| 33 |
|
| 34 |
speech_array, sampling_rate = librosa.load(audio_path, sr=16_000)
|