Spaces:
Sleeping
Sleeping
AshDavid12
commited on
Commit
·
099edc3
1
Parent(s):
1317fe0
tyr timeout grasful
Browse files- Dockerfile +1 -1
- client.py +1 -1
Dockerfile
CHANGED
@@ -28,4 +28,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
28 |
COPY . .
|
29 |
|
30 |
# Run FastAPI with Uvicorn
|
31 |
-
CMD ["uvicorn", "infer:app", "--host", "0.0.0.0", "--port","7860","--timeout-keep-alive","300"]
|
|
|
28 |
COPY . .
|
29 |
|
30 |
# Run FastAPI with Uvicorn
|
31 |
+
CMD ["uvicorn", "infer:app", "--host", "0.0.0.0", "--port","7860","--timeout-keep-alive","300","--timeout-graceful-shutdown", "60"]
|
client.py
CHANGED
@@ -24,7 +24,7 @@ async def send_audio(websocket):
|
|
24 |
# Send buffered audio data once it's large enough
|
25 |
if len(audio_buffer) >= buffer_size:
|
26 |
await websocket.send(audio_buffer)
|
27 |
-
print(f"Sent {len(audio_buffer)} bytes of audio data.")
|
28 |
audio_buffer.clear()
|
29 |
await asyncio.sleep(0.001)
|
30 |
|
|
|
24 |
# Send buffered audio data once it's large enough
|
25 |
if len(audio_buffer) >= buffer_size:
|
26 |
await websocket.send(audio_buffer)
|
27 |
+
#print(f"Sent {len(audio_buffer)} bytes of audio data.")
|
28 |
audio_buffer.clear()
|
29 |
await asyncio.sleep(0.001)
|
30 |
|