Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ pipe_1b = pipeline(model="Finnish-NLP/wav2vec2-xlsr-1b-finnish-lm-v2",chunk_leng
|
|
27 |
|
28 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
29 |
model_checkpoint = 'Finnish-NLP/t5-small-nl24-casing-punctuation-correction'
|
30 |
-
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint
|
31 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint, from_flax=False, torch_dtype=torch.float32, use_auth_token=os.environ.get('hf_token')).to(device)
|
32 |
|
33 |
# define speech-to-text function
|
|
|
27 |
|
28 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
29 |
model_checkpoint = 'Finnish-NLP/t5-small-nl24-casing-punctuation-correction'
|
30 |
+
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)#, use_auth_token=os.environ.get('hf_token'))
|
31 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint, from_flax=False, torch_dtype=torch.float32, use_auth_token=os.environ.get('hf_token')).to(device)
|
32 |
|
33 |
# define speech-to-text function
|