Spaces:
Sleeping
Sleeping
Upload server/app.py with huggingface_hub
Browse files- server/app.py +16 -0
server/app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import uvicorn
|
| 2 |
+
from fastapi import FastAPI
|
| 3 |
+
from productivity_env import ProductivityEnv
|
| 4 |
+
|
| 5 |
+
app = FastAPI()
|
| 6 |
+
env = ProductivityEnv()
|
| 7 |
+
|
| 8 |
+
@app.get("/health")
|
| 9 |
+
def health():
|
| 10 |
+
return {"status": "ok"}
|
| 11 |
+
|
| 12 |
+
def main():
|
| 13 |
+
uvicorn.run("server.app:app", host="0.0.0.0", port=7860)
|
| 14 |
+
|
| 15 |
+
if __name__ == "__main__":
|
| 16 |
+
main()
|