crazyscientist1 commited on
Commit
40c9bdd
1 Parent(s): 1af9ad0

Update appTest.py

Browse files
Files changed (1) hide show
  1. appTest.py +9 -8
appTest.py CHANGED
@@ -80,6 +80,15 @@ CNN, model = load_model()
80
  with input:
81
  st.header("Input")
82
  imageInput = st.file_uploader("Enter an image of a thin blood smear.")
 
 
 
 
 
 
 
 
 
83
  if st.button("Preview"):
84
  if imageInput is not None:
85
  image = Image.open(imageInput)
@@ -91,14 +100,6 @@ with input:
91
  st.write("-" * 34)
92
  st.header("How it looks:")
93
  st.image(ogInp)
94
-
95
- if st.button("Run"):
96
- if imageInput is not None:
97
- image = Image.open(imageInput)
98
- ogInp = image
99
- img_array = np.array(image)
100
- output, cellImgs = main(CNN, model, img_array)
101
- showImg = Image.fromarray(output)
102
 
103
 
104
  with outputIm:
 
80
  with input:
81
  st.header("Input")
82
  imageInput = st.file_uploader("Enter an image of a thin blood smear.")
83
+
84
+ if st.button("Run"):
85
+ if imageInput is not None:
86
+ image = Image.open(imageInput)
87
+ ogInp = image
88
+ img_array = np.array(image)
89
+ output, cellImgs = main(CNN, model, img_array)
90
+ showImg = Image.fromarray(output)
91
+
92
  if st.button("Preview"):
93
  if imageInput is not None:
94
  image = Image.open(imageInput)
 
100
  st.write("-" * 34)
101
  st.header("How it looks:")
102
  st.image(ogInp)
 
 
 
 
 
 
 
 
103
 
104
 
105
  with outputIm: