drmurataltun commited on
Commit
b98f7fd
·
verified ·
1 Parent(s): 7a17e02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,7 +20,6 @@ st.title('Malaria Parazit Tarama')
20
  st.write('Resim seçin ve model tahmin etsin')
21
 
22
  file = st.file_uploader('Bir resim seçin', type=['jpg', 'jpeg', 'png'])
23
- class_names = ['Normal', 'Parazit']
24
 
25
  if file is not None:
26
  img = Image.open(file)
@@ -28,5 +27,6 @@ if file is not None:
28
  image = process_image(img)
29
  prediction = model.predict(image)
30
  st.write(prediction[0])
31
- predicted_class = np.argmax(prediction)
32
- st.write(class_names[predicted_class])
 
 
20
  st.write('Resim seçin ve model tahmin etsin')
21
 
22
  file = st.file_uploader('Bir resim seçin', type=['jpg', 'jpeg', 'png'])
 
23
 
24
  if file is not None:
25
  img = Image.open(file)
 
27
  image = process_image(img)
28
  prediction = model.predict(image)
29
  st.write(prediction[0])
30
+ if prediction[0]<=.5:
31
+ st.write('Normal')
32
+ else: st.write('Parazit')