Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,16 @@ from transformers import pipeline
|
|
4 |
import io
|
5 |
|
6 |
# Load the model
|
7 |
-
pipe = pipeline("automatic-speech-recognition", model="facebook/seamless-m4t-v2-large")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
# Streamlit title and instructions
|
10 |
st.title("Real-Time Speech Recognition")
|
|
|
4 |
import io
|
5 |
|
6 |
# Load the model
|
7 |
+
#pipe = pipeline("automatic-speech-recognition", model="facebook/seamless-m4t-v2-large")
|
8 |
+
|
9 |
+
from transformers import AutoTokenizer
|
10 |
+
|
11 |
+
# Load the correct tokenizer for the model
|
12 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/seamless-m4t-v2-large")
|
13 |
+
|
14 |
+
# Initialize the pipeline
|
15 |
+
pipe = pipeline("automatic-speech-recognition", model="facebook/seamless-m4t-v2-large", tokenizer=tokenizer)
|
16 |
+
|
17 |
|
18 |
# Streamlit title and instructions
|
19 |
st.title("Real-Time Speech Recognition")
|