saritha5 commited on
Commit
11eacd0
·
1 Parent(s): e03bb58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -95,6 +95,7 @@ else:
95
  #plt. figure(figsize=(10,9))
96
  def occ_predict(imgpath):
97
  im = []
 
98
  image=cv2.imread(imgpath)
99
  st.write(type(image))
100
  #imgplot = plt.imshow(image)
@@ -128,12 +129,12 @@ else:
128
  #stringio = StringIO(f.getvalue())
129
  #f = stringio.read()
130
  image1= Image.open(f)
131
- st.write(type(image1))
132
  st.image(image1,use_column_width = True)
133
  #image_path = Path(f.name)
134
  #st.write(image_path)
135
 
136
- predicted_label,variance_score = occ_predict(str(f.name))
137
  #st.header(predicted_label)
138
  #st.header(str(round(variance_score,2)))
139
  string1 = "The image is," + predicted_label + " with the score value of " + str(round(variance_score,2))
 
95
  #plt. figure(figsize=(10,9))
96
  def occ_predict(imgpath):
97
  im = []
98
+ imgpath = str(imgpath)
99
  image=cv2.imread(imgpath)
100
  st.write(type(image))
101
  #imgplot = plt.imshow(image)
 
129
  #stringio = StringIO(f.getvalue())
130
  #f = stringio.read()
131
  image1= Image.open(f)
132
+ st.write(type(f.name))
133
  st.image(image1,use_column_width = True)
134
  #image_path = Path(f.name)
135
  #st.write(image_path)
136
 
137
+ predicted_label,variance_score = occ_predict(f.name)
138
  #st.header(predicted_label)
139
  #st.header(str(round(variance_score,2)))
140
  string1 = "The image is," + predicted_label + " with the score value of " + str(round(variance_score,2))