Calvin commited on
Commit
5b37c3f
·
1 Parent(s): 8eb87d6

fix runtime

Browse files
Files changed (1) hide show
  1. main.py → app.py +1 -6
main.py → app.py RENAMED
@@ -102,9 +102,4 @@ async def api_tts_url(req: TTSRequest):
102
  res = await api_tts(req)
103
  # We can't easily return a hosted URL without external storage.
104
  # So return error telling user to use /api/tts which streams audio.
105
- return JSONResponse({"error": "This Space does not host persistent URLs. Use /api/tts to stream audio."}, status_code=400)
106
-
107
- import uvicorn
108
-
109
- if __name__ == "__main__":
110
- uvicorn.run("main:app", host="0.0.0.0", port=7860)
 
102
  res = await api_tts(req)
103
  # We can't easily return a hosted URL without external storage.
104
  # So return error telling user to use /api/tts which streams audio.
105
+ return JSONResponse({"error": "This Space does not host persistent URLs. Use /api/tts to stream audio."}, status_code=400)