Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,10 @@ from validate import TransactionData # Shared schema
|
|
| 9 |
|
| 10 |
app = FastAPI()
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
# Expose APIs
|
| 13 |
app.add_api_route("/train", train_model, methods=["POST"])
|
| 14 |
app.add_api_route("/predict", predict, methods=["POST"])
|
|
|
|
| 9 |
|
| 10 |
app = FastAPI()
|
| 11 |
|
| 12 |
+
@app.get("/")
|
| 13 |
+
def root():
|
| 14 |
+
return {"message": "LogReg FastAPI is up. Use /docs for API UI."}
|
| 15 |
+
|
| 16 |
# Expose APIs
|
| 17 |
app.add_api_route("/train", train_model, methods=["POST"])
|
| 18 |
app.add_api_route("/predict", predict, methods=["POST"])
|