Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,10 +2,11 @@ from transformers import pipeline
|
|
2 |
import gradio as gr
|
3 |
|
4 |
# Load pre-trained models
|
5 |
-
stt_model = pipeline("automatic-speech-recognition", model="openai/whisper-
|
6 |
-
nlp_model = pipeline("text-generation", model="gpt2")
|
7 |
tts_model = pipeline("text-to-speech", model="tts-coqui/coqui-tts-en")
|
8 |
|
|
|
9 |
# Define a function to handle the workflow
|
10 |
def conversation(audio):
|
11 |
# Step 1: Convert speech to text
|
|
|
2 |
import gradio as gr
|
3 |
|
4 |
# Load pre-trained models
|
5 |
+
stt_model = pipeline("automatic-speech-recognition", model="openai/whisper-tiny")
|
6 |
+
nlp_model = pipeline("text-generation", model="sshleifer/tiny-gpt2")
|
7 |
tts_model = pipeline("text-to-speech", model="tts-coqui/coqui-tts-en")
|
8 |
|
9 |
+
|
10 |
# Define a function to handle the workflow
|
11 |
def conversation(audio):
|
12 |
# Step 1: Convert speech to text
|