Sravanth Ganta commited on
Commit
97d80cd
·
1 Parent(s): 253fb76

Cancer Detector AppV1

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -69,19 +69,19 @@ show=True
69
  #path = glob.glob('*.png')
70
 
71
  def show_preds_image(path):
72
- # for image in path:
73
- # img = Image.open(image)
74
- # if show:
75
- # plt.imshow(img)
76
- # plt.show()
77
- img = cv2.imread(path)
78
- class_name = ['adenocarcinoma',
79
- 'large.cell.carcinoma',
80
- 'normal',
81
- 'squamous.cell.carcinoma']
82
- prob, result = predict(img, model, 'cpu', class_name)
83
- if display_prob:
84
- print('Probability of {} : {:.6f}'.format(result, prob))
85
 
86
  return prob, result
87
 
 
69
  #path = glob.glob('*.png')
70
 
71
  def show_preds_image(path):
72
+ for image in path:
73
+ img = Image.open(image)
74
+ if show:
75
+ plt.imshow(img)
76
+ plt.show()
77
+ #img = cv2.imread(path)
78
+ class_name = ['adenocarcinoma',
79
+ 'large.cell.carcinoma',
80
+ 'normal',
81
+ 'squamous.cell.carcinoma']
82
+ prob, result = predict(img, model, 'cpu', class_name)
83
+ if display_prob:
84
+ print('Probability of {} : {:.6f}'.format(result, prob))
85
 
86
  return prob, result
87