rasmodev commited on
Commit
be480c8
·
1 Parent(s): a8f4f3a

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -0
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()