PerryCheng614 commited on
Commit
b97cf3c
1 Parent(s): 22c5bdb

fix yield error

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -8,7 +8,8 @@ async def process_audio_stream(audio_path, max_tokens):
8
  Process audio with streaming response via WebSocket
9
  """
10
  if not audio_path:
11
- return "Please upload or record an audio file first."
 
12
 
13
  try:
14
  # Read audio file
 
8
  Process audio with streaming response via WebSocket
9
  """
10
  if not audio_path:
11
+ yield "Please upload or record an audio file first."
12
+ return
13
 
14
  try:
15
  # Read audio file