Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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=
|
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."
|