Sibinraj commited on
Commit
8ac4b00
·
1 Parent(s): cfccb9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -32,11 +32,14 @@ if task1=="Tumor Detection":
32
  return"Tumor"
33
  else:
34
  return"No Tumor"
35
- if img != None:
36
- img_f="D:/SEM 3/DL/DL-ALGORITHMS/CNN/tumor_detection/tumordata/pred/"
37
- img_p=img_f + img.name
38
- pred=cnn_make_prediction(img_p,cnn_model)
39
- st.write(pred)
 
 
 
40
 
41
 
42
  #choosing classification
 
32
  return"Tumor"
33
  else:
34
  return"No Tumor"
35
+ if img is not None:
36
+ st.image(img, caption="Uploaded Image.", use_column_width=False, width=200)
37
+ st.write("")
38
+
39
+ if st.button("Detect Tumor"):
40
+ result =cnn_make_prediction(img, cnn_model)
41
+ st.subheader("Tumor Detection Result")
42
+ st.write(f"**{result}**")
43
 
44
 
45
  #choosing classification