Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
|
|
3 |
|
4 |
-
#
|
5 |
-
|
|
|
|
|
|
|
6 |
|
7 |
def transcribe(audio):
|
8 |
# Pass the audio file to the pipeline and obtain the output
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
+
from transformers import AutoTokenizer
|
4 |
|
5 |
+
# Create a PretrainedTokenizer object
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained('wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut')
|
7 |
+
|
8 |
+
# Pass the PretrainedTokenizer object as the tokenizer argument
|
9 |
+
p = pipeline('text-generation', model='wannaphong/wav2vec2-large-xlsr-53-th-cv8-deepcut', tokenizer=tokenizer)
|
10 |
|
11 |
def transcribe(audio):
|
12 |
# Pass the audio file to the pipeline and obtain the output
|