Update app.py
Browse files
app.py
CHANGED
@@ -3,10 +3,10 @@ import torch
|
|
3 |
from transformers import AutoProcessor, AutoModelForCTC
|
4 |
import soundfile as sf # For handling audio input
|
5 |
|
6 |
-
# Load
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
|
11 |
# ASR λ³ν ν¨μ (speech-to-text conversion)
|
12 |
def asr_generate(audio):
|
|
|
3 |
from transformers import AutoProcessor, AutoModelForCTC
|
4 |
import soundfile as sf # For handling audio input
|
5 |
|
6 |
+
# Load model directly
|
7 |
+
from transformers import AutoTokenizer, AutoModelForPreTraining
|
8 |
+
tokenizer = AutoTokenizer.from_pretrained("Opit/mms_tts_bulgarian_finetuning")
|
9 |
+
model = AutoModelForPreTraining.from_pretrained("Opit/mms_tts_bulgarian_finetuning")
|
10 |
|
11 |
# ASR λ³ν ν¨μ (speech-to-text conversion)
|
12 |
def asr_generate(audio):
|