Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -244,14 +244,13 @@ with gr.Blocks(title="Orpheus Text-to-Speech") as demo:
|
|
244 |
)
|
245 |
|
246 |
# Enable queuing for Gradio
|
247 |
-
queue_demo = demo.queue()
|
248 |
-
|
249 |
-
# Create FastAPI app and mount Gradio ASGI app
|
250 |
app = FastAPI()
|
251 |
-
|
|
|
|
|
252 |
|
253 |
# WebSocket TTS endpoint
|
254 |
-
|
255 |
async def websocket_tts(websocket: WebSocket):
|
256 |
await websocket.accept()
|
257 |
try:
|
|
|
244 |
)
|
245 |
|
246 |
# Enable queuing for Gradio
|
|
|
|
|
|
|
247 |
app = FastAPI()
|
248 |
+
queue_demo = demo.queue()
|
249 |
+
app.mount("/queue-app", queue_demo.app)
|
250 |
+
app.mount("/", demo.app) # HTTP‑Version unter root
|
251 |
|
252 |
# WebSocket TTS endpoint
|
253 |
+
@app.websocket("/ws/tts")
|
254 |
async def websocket_tts(websocket: WebSocket):
|
255 |
await websocket.accept()
|
256 |
try:
|