Spaces:
Build error
Build error
Commit ·
324dfd6
1
Parent(s): e1ffdf4
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ ann_model.load_weights('model_weights.h5')
|
|
| 42 |
|
| 43 |
# Make predictions when the 'Predict' button is clicked
|
| 44 |
if user_input.form_submit_button('Predict'):
|
| 45 |
-
input_array = input_data.
|
| 46 |
prediction = ann_model.predict(input_array)
|
| 47 |
prediction_label = 'Malignant' if prediction[0] >= 0.5 else 'Benign'
|
| 48 |
st.subheader('Prediction')
|
|
|
|
| 42 |
|
| 43 |
# Make predictions when the 'Predict' button is clicked
|
| 44 |
if user_input.form_submit_button('Predict'):
|
| 45 |
+
input_array = input_data.values.reshape(1, 30) # Convert DataFrame to NumPy array and reshape
|
| 46 |
prediction = ann_model.predict(input_array)
|
| 47 |
prediction_label = 'Malignant' if prediction[0] >= 0.5 else 'Benign'
|
| 48 |
st.subheader('Prediction')
|