akshaylinson commited on
Commit
b296e35
·
1 Parent(s): c6607dc

fix: add uvicorn.run to keep process alive

Browse files
Files changed (2) hide show
  1. app.py +4 -0
  2. requirements.txt +1 -0
app.py CHANGED
@@ -112,3 +112,7 @@ async def synthesize(
112
  return Response(content=buf.getvalue(), media_type="audio/wav")
113
 
114
  app = gr.mount_gradio_app(_api, demo, path="/")
 
 
 
 
 
112
  return Response(content=buf.getvalue(), media_type="audio/wav")
113
 
114
  app = gr.mount_gradio_app(_api, demo, path="/")
115
+
116
+ if __name__ == "__main__":
117
+ import uvicorn
118
+ uvicorn.run(app, host="0.0.0.0", port=7860)
requirements.txt CHANGED
@@ -1,5 +1,6 @@
1
  spaces
2
  fastapi
 
3
  python-multipart
4
  # IndicF5 dependencies
5
  accelerate>=0.33.0
 
1
  spaces
2
  fastapi
3
+ uvicorn[standard]
4
  python-multipart
5
  # IndicF5 dependencies
6
  accelerate>=0.33.0