Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,10 +13,11 @@ from sklearn import datasets
|
|
| 13 |
iris = datasets.load_iris()
|
| 14 |
|
| 15 |
# Define the prediction function
|
| 16 |
-
def predict_iris(sepal_length, sepal_width, petal_length, petal_width):
|
| 17 |
prediction = clf.predict([[sepal_length, sepal_width, petal_length, petal_width]])
|
| 18 |
return iris.target_names[int(prediction[0])]
|
| 19 |
|
|
|
|
| 20 |
# Create and launch the Gradio interface
|
| 21 |
interface = gr.Interface(
|
| 22 |
fn=predict_iris,
|
|
|
|
| 13 |
iris = datasets.load_iris()
|
| 14 |
|
| 15 |
# Define the prediction function
|
| 16 |
+
def predict_iris(sepal_length: "Sepal Length", sepal_width: "Sepal Width", petal_length: "Petal Length", petal_width: "Petal Width"):
|
| 17 |
prediction = clf.predict([[sepal_length, sepal_width, petal_length, petal_width]])
|
| 18 |
return iris.target_names[int(prediction[0])]
|
| 19 |
|
| 20 |
+
|
| 21 |
# Create and launch the Gradio interface
|
| 22 |
interface = gr.Interface(
|
| 23 |
fn=predict_iris,
|