Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,12 +23,16 @@ with open("catboost_pipeline_4.job", "rb") as f:
|
|
23 |
pipe = joblib.load(f)
|
24 |
print(pipe)
|
25 |
|
|
|
|
|
|
|
|
|
26 |
@app.get("/")
|
27 |
async def root():
|
28 |
return {
|
29 |
-
"Info" : "
|
30 |
}
|
31 |
-
|
32 |
@app.post("/predict")
|
33 |
async def predict(file: UploadFile = File(...)):
|
34 |
try:
|
|
|
23 |
pipe = joblib.load(f)
|
24 |
print(pipe)
|
25 |
|
26 |
+
# instantiating fastAPI object
|
27 |
+
app = FastAPI( title = "Machine Learning Classification API for predicting \
|
28 |
+
Income limit as Above Limit / Below Limit")
|
29 |
+
|
30 |
@app.get("/")
|
31 |
async def root():
|
32 |
return {
|
33 |
+
"Info" : "Prediction API for Income Limit (50K) as Above / Below "
|
34 |
}
|
35 |
+
|
36 |
@app.post("/predict")
|
37 |
async def predict(file: UploadFile = File(...)):
|
38 |
try:
|