shubham680 commited on
Commit
659e17f
·
verified ·
1 Parent(s): 42f4dd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -41,12 +41,10 @@ if uploaded_img is not None:
41
  file_bytes = np.frombuffer(uploaded_img.read(), np.uint8)
42
  img = cv2.imdecode(file_bytes, cv2.IMREAD_GRAYSCALE)
43
  img_resized = cv2.resize(img,(28,28),interpolation=cv2.INTER_AREA)
44
- img_norm = img_resized.astype('float32') / 255.0
45
- input_img = img_norm.reshape(1,28,28,1)
 
46
 
47
- #model.predict(np.zeros((1, 28, 28, 1), dtype=np.float32))
48
- # dummy_input = tf.zeros((1, 28, 28, 1))
49
- # _ = model(dummy_input)
50
 
51
  st.image(img_norm, caption="Uploaded Image (Resized to 28x28)", use_container_width =True, channels="GRAY")
52
 
 
41
  file_bytes = np.frombuffer(uploaded_img.read(), np.uint8)
42
  img = cv2.imdecode(file_bytes, cv2.IMREAD_GRAYSCALE)
43
  img_resized = cv2.resize(img,(28,28),interpolation=cv2.INTER_AREA)
44
+ #img_norm = img_resized.astype('float32') / 255.0
45
+ input_img = img_resized.reshape(1,28,28,1)
46
+
47
 
 
 
 
48
 
49
  st.image(img_norm, caption="Uploaded Image (Resized to 28x28)", use_container_width =True, channels="GRAY")
50