Tomtom84 commited on
Commit
a8606ac
·
verified ·
1 Parent(s): 8428419

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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
- app.mount("/", queue_demo.app) # mount the ASGI app, not the Blocks object itself
 
 
252
 
253
  # WebSocket TTS endpoint
254
- #@app.websocket("/ws/tts")
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: