chalana2001 commited on
Commit
f6f3d33
·
verified ·
1 Parent(s): 4621550

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/")
6
+ def read_root():
7
+ return {"Hello": "World"}
8
+
9
+ @app.get("/test")
10
+ def test():
11
+ return {"message": "Test endpoint working!"}
12
+
13
+ # This will run when you use: python app.py
14
+ if __name__ == "__main__":
15
+ import uvicorn
16
+ uvicorn.run(app, host="0.0.0.0", port=7860)