PebinAPJ commited on
Commit
9d01905
·
verified ·
1 Parent(s): 07fb3b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,4 +1,3 @@
1
- # app.py
2
  import gradio as gr
3
  import pandas as pd
4
  import joblib
@@ -8,7 +7,7 @@ data = pd.read_csv('Iris.csv')
8
  data.drop(columns=['Id'], inplace=True)
9
 
10
  # Load the saved model
11
- model = joblib.load('best_random_forest_model.pkl')
12
 
13
  def classify_iris(sepal_length, sepal_width, petal_length, petal_width):
14
  """Classify iris species based on input features."""
@@ -28,4 +27,4 @@ outputs = gr.Textbox(label="Predicted Iris Species")
28
 
29
  description = "This app classifies iris species (Setosa, Versicolor, Virginica) based on the given features."
30
 
31
- gr.Interface(fn=classify_iris, inputs=inputs, outputs=outputs, title="Iris Species Classifier", description=description).launch()
 
 
1
  import gradio as gr
2
  import pandas as pd
3
  import joblib
 
7
  data.drop(columns=['Id'], inplace=True)
8
 
9
  # Load the saved model
10
+ model = joblib.load('model.pkl')
11
 
12
  def classify_iris(sepal_length, sepal_width, petal_length, petal_width):
13
  """Classify iris species based on input features."""
 
27
 
28
  description = "This app classifies iris species (Setosa, Versicolor, Virginica) based on the given features."
29
 
30
+ gr.Interface(fn=classify_iris, inputs=inputs, outputs=outputs, title="Iris Species Classifier", description=description).launch()