Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,11 @@ model = DecisionTreeClassifier(random_state=42)
|
|
| 10 |
model.fit(iris.data, iris.target)
|
| 11 |
class_names = ["setosa", "versicolor", "virginica"]
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
@app.get("/health")
|
| 14 |
async def health():
|
| 15 |
return {"status": "ok"}
|
|
|
|
| 10 |
model.fit(iris.data, iris.target)
|
| 11 |
class_names = ["setosa", "versicolor", "virginica"]
|
| 12 |
|
| 13 |
+
|
| 14 |
+
@app.get("/")
|
| 15 |
+
async def root():
|
| 16 |
+
return {"message": "Iris Classifier API is running"}
|
| 17 |
+
|
| 18 |
@app.get("/health")
|
| 19 |
async def health():
|
| 20 |
return {"status": "ok"}
|