Spaces:
Running
Running
Create server.py
Browse files
server.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import uvicorn
|
3 |
+
from fastapi import FastAPI
|
4 |
+
|
5 |
+
app = FastAPI(docs_url=None, redoc_url="/")
|
6 |
+
|
7 |
+
@app.get("/status")
|
8 |
+
def hello():
|
9 |
+
return {"message": "running"}
|
10 |
+
|
11 |
+
if __name__ == "__main__":
|
12 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|