ikraamkb commited on
Commit
76fbd63
·
verified ·
1 Parent(s): 404baab

Create server.py

Browse files
Files changed (1) hide show
  1. server.py +11 -0
server.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/")
6
+ def read_root():
7
+ return {"message": "FastAPI on Hugging Face Spaces"}
8
+
9
+ if __name__ == "__main__":
10
+ import uvicorn
11
+ uvicorn.run(app, host="0.0.0.0", port=7860)