thechaiexperiment commited on
Commit
75e444a
·
verified ·
1 Parent(s): 9481b36

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -4,8 +4,15 @@ import uvicorn
4
  from fastapi import FastAPI
5
  app = FastAPI()
6
 
 
 
 
 
 
 
 
 
7
  if __name__ == "__main__":
 
8
  port = int(os.getenv("PORT", 8000))
9
- uvicorn.run(app, host="0.0.0.0", port=port)
10
-
11
-
 
4
  from fastapi import FastAPI
5
  app = FastAPI()
6
 
7
+ @app.get("/")
8
+ async def root():
9
+ return {
10
+ "name": "Test",
11
+ "version": "1.0.0",
12
+ "status": "running"
13
+ }
14
+
15
  if __name__ == "__main__":
16
+ # Get port from environment variable (for Hugging Face Spaces)
17
  port = int(os.getenv("PORT", 8000))
18
+ uvicorn.run(app, host="0.0.0.0", port=port)