freddyaboulton HF staff commited on
Commit
3ce0cf6
1 Parent(s): 25114f9
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import asyncio
2
  import base64
3
  import os
4
- import time
5
  from threading import Event, Thread
6
 
7
  import gradio as gr
@@ -72,8 +71,7 @@ class OpenAIHandler(StreamHandler):
72
  conn.session.update(session={"turn_detection": {"type": "server_vad"}})
73
  self.connection = conn
74
  self.connected.set()
75
- while not self.quit.is_set():
76
- time.sleep(0.25)
77
 
78
  async def fetch_args(
79
  self,
 
1
  import asyncio
2
  import base64
3
  import os
 
4
  from threading import Event, Thread
5
 
6
  import gradio as gr
 
71
  conn.session.update(session={"turn_detection": {"type": "server_vad"}})
72
  self.connection = conn
73
  self.connected.set()
74
+ self.quit.wait()
 
75
 
76
  async def fetch_args(
77
  self,