Spaces:
Build error
Build error
rishabh5752
commited on
Commit
•
f133932
1
Parent(s):
4284dd7
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
|
|
3 |
from tensorflow.keras.models import Sequential
|
4 |
from tensorflow.keras.layers import Dense, Dropout, Activation
|
5 |
|
@@ -41,7 +42,8 @@ ann_model.load_weights('model_weights.h5')
|
|
41 |
|
42 |
# Make predictions when the 'Predict' button is clicked
|
43 |
if user_input.form_submit_button('Predict'):
|
44 |
-
|
|
|
45 |
prediction_label = 'Malignant' if prediction[0] >= 0.5 else 'Benign'
|
46 |
st.subheader('Prediction')
|
47 |
st.write(f'The lesion is predicted to be: {prediction_label}')
|
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
+
import numpy as np
|
4 |
from tensorflow.keras.models import Sequential
|
5 |
from tensorflow.keras.layers import Dense, Dropout, Activation
|
6 |
|
|
|
42 |
|
43 |
# Make predictions when the 'Predict' button is clicked
|
44 |
if user_input.form_submit_button('Predict'):
|
45 |
+
input_array = np.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')
|
49 |
st.write(f'The lesion is predicted to be: {prediction_label}')
|