Commit b8df16a6 authored by gd1551's avatar gd1551 Committed by GitHub

use port env var if provided

parent 6fb46dd8
......@@ -288,4 +288,4 @@ async def predict_tags(request: TextRequest, authorized: bool = Depends(verify_t
return ErrorOutput(error=str(e))
if __name__ == "__main__":
uvicorn.run("main:app", host="0.0.0.0", port=80, log_level="info")
uvicorn.run("main:app", host="0.0.0.0", port=int(os.getenv("PORT", "80")), log_level="info")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment