qqwjq1981 commited on
Commit
d1bfa53
·
verified ·
1 Parent(s): 22e41e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -5,3 +5,7 @@ app = FastAPI()
5
  @app.get("/")
6
  async def index():
7
  return {"message": "App is running"}
 
 
 
 
 
5
  @app.get("/")
6
  async def index():
7
  return {"message": "App is running"}
8
+
9
+ if __name__ == "__main__":
10
+ port = int(os.getenv("PORT", 7860)) # Default to 7860 if PORT is not set
11
+ uvicorn.run(app, host="0.0.0.0", port=port)