Spaces:
Sleeping
Sleeping
divakaivan
commited on
Commit
•
6f5c4d3
1
Parent(s):
6ef3a8f
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from transformers import pipeline,
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
import numpy as np
|
@@ -10,11 +10,6 @@ from openai import OpenAI
|
|
10 |
# Load ASR model
|
11 |
asr_pipe = pipeline(model="divakaivan/glaswegian-asr")
|
12 |
|
13 |
-
# Load GPT-2 model for generating responses
|
14 |
-
model_name = "gpt2"
|
15 |
-
gpt_tokenizer = GPT2Tokenizer.from_pretrained(model_name)
|
16 |
-
gpt_model = GPT2LMHeadModel.from_pretrained(model_name)
|
17 |
-
|
18 |
# Load TTS components
|
19 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
20 |
tts_model = SpeechT5ForTextToSpeech.from_pretrained("divakaivan/glaswegian_tts")
|
|
|
1 |
+
from transformers import pipeline, SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
import numpy as np
|
|
|
10 |
# Load ASR model
|
11 |
asr_pipe = pipeline(model="divakaivan/glaswegian-asr")
|
12 |
|
|
|
|
|
|
|
|
|
|
|
13 |
# Load TTS components
|
14 |
processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
|
15 |
tts_model = SpeechT5ForTextToSpeech.from_pretrained("divakaivan/glaswegian_tts")
|