freddyaboulton HF Staff commited on
Commit
2106106
Β·
verified Β·
1 Parent(s): 666db96

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -84,6 +84,11 @@ class PhonicHandler(AsyncStreamHandler):
84
  except Exception as e:
85
  raise WebRTCError(f"Error sending audio: {e}")
86
 
 
 
 
 
 
87
 
88
  def add_to_chatbot(state, chatbot, message):
89
  state.append(message)
 
84
  except Exception as e:
85
  raise WebRTCError(f"Error sending audio: {e}")
86
 
87
+ async def shutdown(self):
88
+ if self.client:
89
+ await self.client._websocket.close()
90
+ return super().shutdown()
91
+
92
 
93
  def add_to_chatbot(state, chatbot, message):
94
  state.append(message)