alok94 commited on
Commit
a231ba0
·
1 Parent(s): 90c0e1d

background dict

Browse files
Files changed (2) hide show
  1. app.py +4 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -114,8 +114,10 @@ def predict_digit(img):
114
  #img_data = im.fromarray(img)
115
  #img_data.save(f"image1.jpg")
116
  #count=count+1
117
- img_3d=img.reshape(-1,28,28)
118
- img_resized=img_3d/255.0
 
 
119
  pred_prob=loaded_model.predict(img_resized)
120
 
121
  pred_prob=pred_prob*100
 
114
  #img_data = im.fromarray(img)
115
  #img_data.save(f"image1.jpg")
116
  #count=count+1
117
+ print(img)
118
+ img_3d=img['background'].reshape(-1,28,28)
119
+ print(img_3d)
120
+ img_resized=img/255.0
121
  pred_prob=loaded_model.predict(img_resized)
122
 
123
  pred_prob=pred_prob*100
requirements.txt CHANGED
@@ -5,6 +5,6 @@ scikit_learn<1.3.0
5
  seaborn==0.12.2
6
 
7
  #torchvision<0.15.2
8
- gradio==3.48.0
9
 
10
  #streamlit==1.26.0
 
5
  seaborn==0.12.2
6
 
7
  #torchvision<0.15.2
8
+ gradio
9
 
10
  #streamlit==1.26.0