Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# main app file
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
from fastapi import FastAPI
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
app=FastAPI()
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
@app.get("/")
|
| 12 |
+
def home():
|
| 13 |
+
try:
|
| 14 |
+
return {"healthcheck":"positive"}
|
| 15 |
+
except Exception as e:
|
| 16 |
+
return {"healthcheck":"negative"}
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|