suryadev1 commited on
Commit
1a5b82c
·
verified ·
1 Parent(s): 9007314

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -18,14 +18,11 @@ def predict(input_data):
18
  predictions = knn.predict([[0.2,0.03,0.0,1.0,0.0]])
19
  return predictions[0]
20
 
21
- # Create Gradio interface
22
- # Adjust the input components based on the number of features your model expects
23
- input_components = [gr.inputs.Number(label=f"Feature {i+1}") for i in range(4)]
24
- output_component = gr.outputs.Textbox(label="Prediction")
25
 
26
  iface = gr.Interface(
27
  fn=predict,
28
- inputs=input_components,
29
  outputs=output_component,
30
  title="KNN Model Prediction",
31
  description="Enter values for each feature to get a prediction."
 
18
  predictions = knn.predict([[0.2,0.03,0.0,1.0,0.0]])
19
  return predictions[0]
20
 
21
+
 
 
 
22
 
23
  iface = gr.Interface(
24
  fn=predict,
25
+ inputs='text',
26
  outputs=output_component,
27
  title="KNN Model Prediction",
28
  description="Enter values for each feature to get a prediction."