Update main.py
Browse files
main.py
CHANGED
|
@@ -44,6 +44,13 @@ class IncomePredictionResponse(BaseModel):
|
|
| 44 |
income_prediction: str
|
| 45 |
prediction_probability: float
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
@app.post("/predict/")
|
| 48 |
async def predict_income(data: IncomePredictionRequest):
|
| 49 |
input_data = data.dict()
|
|
|
|
| 44 |
income_prediction: str
|
| 45 |
prediction_probability: float
|
| 46 |
|
| 47 |
+
@app.get("/")
|
| 48 |
+
async def root():
|
| 49 |
+
# Endpoint at the root URL ("/") returns a welcome message with a clickable link
|
| 50 |
+
message = "Welcome to the Income Classification API! This API Provides predictions for Income based on several inputs. To use this API, please access the API documentation here: https://rasmodev-sepsis-prediction.hf.space/docs/"
|
| 51 |
+
return message
|
| 52 |
+
|
| 53 |
+
|
| 54 |
@app.post("/predict/")
|
| 55 |
async def predict_income(data: IncomePredictionRequest):
|
| 56 |
input_data = data.dict()
|