Mushfi commited on
Commit
c5387fd
·
1 Parent(s): 613b720

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -12,11 +12,9 @@ LABELS = ['NORMAL', 'TUBERCULOSIS', 'PNEUMONIA', 'COVID19']
12
 
13
  def predict_input_image(img):
14
  try:
15
- try:
16
- img = Image.open(BytesIO(base64.b64decode(img))).convert('RGB').resize((128,128))
17
- img = np.array(img)
18
- except:
19
- pass
20
  img_4d=img.reshape(-1,128,128,3)/img.max()
21
  print(img_4d.min())
22
  print(img_4d.max())
 
12
 
13
  def predict_input_image(img):
14
  try:
15
+ img = Image.open(BytesIO(base64.b64decode(img))).convert('RGB').resize((128,128))
16
+ img = np.array(img)
17
+
 
 
18
  img_4d=img.reshape(-1,128,128,3)/img.max()
19
  print(img_4d.min())
20
  print(img_4d.max())