kusumakar commited on
Commit
c5dc78d
1 Parent(s): 63f6424

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -17,7 +17,6 @@ def predict_model1(image):
17
 
18
  # make a prediction using model 1
19
  prediction = model1.predict(img)
20
-
21
  return prediction
22
 
23
  # define a function to predict using model 2
@@ -28,12 +27,11 @@ def predict_model2(image):
28
 
29
  # make a prediction using model 2
30
  prediction = model2.predict(img)
31
-
32
  return prediction
33
 
34
  # create the Streamlit app
35
  def app():
36
- st.title('Malaria Detector - CNN Model Comparison')
37
  st.write('Upload an image and see the predictions of two CNN models!')
38
 
39
  # create file uploader
@@ -54,16 +52,13 @@ def app():
54
  prediction2 = predict_model2(image)
55
 
56
  # display the predictions
57
- st.subheader('Model 1 Prediction - Transfer Learning_VGG19')
58
- st.write(prediction1)
59
  if np.argmax(prediction1) == 0:
60
  st.write("Malaria Parasite Not Present in the Blood sample")
61
  else:
62
  st.write("Malaria Parasite Present in the Blood sample")
63
 
64
-
65
  st.subheader('Model 2 Prediction - Built from Scratch')
66
- st.write(prediction2)
67
  if np.round(prediction2) == 1:
68
  st.write("Malaria Parasite Not Present in the Blood sample")
69
  else:
 
17
 
18
  # make a prediction using model 1
19
  prediction = model1.predict(img)
 
20
  return prediction
21
 
22
  # define a function to predict using model 2
 
27
 
28
  # make a prediction using model 2
29
  prediction = model2.predict(img)
 
30
  return prediction
31
 
32
  # create the Streamlit app
33
  def app():
34
+ st.title('Malaria Parasite Presence Detector Using Not One But Two Models')
35
  st.write('Upload an image and see the predictions of two CNN models!')
36
 
37
  # create file uploader
 
52
  prediction2 = predict_model2(image)
53
 
54
  # display the predictions
55
+ st.subheader('Model 1 Prediction - Transfer Learning_VGG16')
 
56
  if np.argmax(prediction1) == 0:
57
  st.write("Malaria Parasite Not Present in the Blood sample")
58
  else:
59
  st.write("Malaria Parasite Present in the Blood sample")
60
 
 
61
  st.subheader('Model 2 Prediction - Built from Scratch')
 
62
  if np.round(prediction2) == 1:
63
  st.write("Malaria Parasite Not Present in the Blood sample")
64
  else: