Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -87,7 +87,10 @@ def gradio_interface():
|
|
87 |
def process_audio(audio_file, history):
|
88 |
if audio_file:
|
89 |
transcription = audio_to_text(audio_file) # Convert audio to text
|
90 |
-
|
|
|
|
|
|
|
91 |
return history
|
92 |
|
93 |
# Set up interaction flow:
|
|
|
87 |
def process_audio(audio_file, history):
|
88 |
if audio_file:
|
89 |
transcription = audio_to_text(audio_file) # Convert audio to text
|
90 |
+
if transcription:
|
91 |
+
history.append({"role": "user", "content": transcription})
|
92 |
+
else:
|
93 |
+
history.append({"role": "assistant", "content": "I couldn't understand your audio. Please try again."})
|
94 |
return history
|
95 |
|
96 |
# Set up interaction flow:
|