Spaces:
Sleeping
Sleeping
Muhammad Ahad Hassan Khan commited on
Commit ·
4709c72
1
Parent(s): 67e2417
modified: app.py
Browse files
app.py
CHANGED
|
@@ -11,6 +11,10 @@ import os
|
|
| 11 |
app = FastAPI()
|
| 12 |
model = load_model("ndvi_best_model.keras")
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
@app.post("/predict/")
|
| 15 |
async def predict_ndvi_api(file: UploadFile = File(...)):
|
| 16 |
try:
|
|
|
|
| 11 |
app = FastAPI()
|
| 12 |
model = load_model("ndvi_best_model.keras")
|
| 13 |
|
| 14 |
+
@app.get("/")
|
| 15 |
+
async def root():
|
| 16 |
+
return {"message": "Welcome to the NDVI prediction API!"}
|
| 17 |
+
|
| 18 |
@app.post("/predict/")
|
| 19 |
async def predict_ndvi_api(file: UploadFile = File(...)):
|
| 20 |
try:
|