Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)
|