Shrikrishna commited on
Commit
10d9f51
1 Parent(s): a242f3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -13
app.py CHANGED
@@ -21,19 +21,24 @@ with col1:
21
  dhoni = Image.open("dhoni.jpg")
22
  st.image(dhoni,width=150, caption='MS Dhoni')
23
 
24
- ganguly = cv2.imread("ganguly.jpg")
 
25
  st.image(ganguly,width=150, caption='Saurav Ganguly')
26
  with col2:
27
- dravid = cv2.imread("rahul.jpg")
28
- st.image(dravid,width=150, caption='Rahul Dravid')
 
29
 
30
- virat = cv2.imread("virat.jpg")
 
31
  st.image(virat,width=150, caption='Virat Kohli')
32
  with col3:
33
- sachin = cv2.imread("sachin.jpg")
 
34
  st.image(sachin,width=150, caption='Sachin Tendulkar')
35
 
36
- sehwag = cv2.imread("sehwag.jpg")
 
37
  st.image(sehwag,width=150, caption='Virendra Sehwag')
38
 
39
 
@@ -174,23 +179,29 @@ if uploaded_image is not None:
174
  celeb = result[0]['class']
175
  st.header("Predicted Image: ")
176
  if celeb == "MS Dhoni":
177
- dhoni = cv2.imread("dhoni.jpg")
 
178
  st.image(dhoni,width=150, caption='MS Dhoni')
179
  elif celeb == "Rahul Dravid":
180
- dravid = cv2.imread("rahul.jpg")
 
181
  st.image(dravid,width=150, caption='Rahul Dravid')
182
  elif celeb == "Sachin Tendulkar":
183
- sachin = cv2.imread("sachin.jpg")
 
184
  st.image(sachin,width=150, caption='Sachin Tendulkar')
185
  elif celeb == "Saurav Ganguly":
186
- ganguly = cv2.imread("ganguly.jpg")
 
187
  st.image(ganguly,width=150, caption='Saurav Ganguly')
188
  elif celeb == "virat_kohli":
189
- virat = cv2.imread("virat.jpg")
 
190
  st.image(virat,width=150, caption='Virat Kohli')
191
  elif celeb == "Virendra Sehwag":
192
- sehwag = cv2.imread("sehwag.jpg")
193
- st.image(virat,width=150, caption='Virendra Sehwag')
 
194
  except:
195
  st.header("Image Cannot be Classified!")
196
 
 
21
  dhoni = Image.open("dhoni.jpg")
22
  st.image(dhoni,width=150, caption='MS Dhoni')
23
 
24
+ #ganguly = cv2.imread("ganguly.jpg")
25
+ ganguly = Image.open("ganguly.jpg")
26
  st.image(ganguly,width=150, caption='Saurav Ganguly')
27
  with col2:
28
+ #rahul = cv2.imread("rahul.jpg")
29
+ rahul = Image.open("rahul.jpg")
30
+ st.image(rahul,width=150, caption='Rahul Dravid')
31
 
32
+ #virat = cv2.imread("virat.jpg")
33
+ virat = Image.open("virat.jpg")
34
  st.image(virat,width=150, caption='Virat Kohli')
35
  with col3:
36
+ #sachin = cv2.imread("sachin.jpg")
37
+ sachin = Image.open("sachin.jpg")
38
  st.image(sachin,width=150, caption='Sachin Tendulkar')
39
 
40
+ #sehwag = cv2.imread("sehwag.jpg")
41
+ sehwag = Image.open("sehwag.jpg")
42
  st.image(sehwag,width=150, caption='Virendra Sehwag')
43
 
44
 
 
179
  celeb = result[0]['class']
180
  st.header("Predicted Image: ")
181
  if celeb == "MS Dhoni":
182
+ #dhoni = cv2.imread("dhoni.jpg")
183
+ dhoni = Image.open("dhoni.jpg")
184
  st.image(dhoni,width=150, caption='MS Dhoni')
185
  elif celeb == "Rahul Dravid":
186
+ #dravid = cv2.imread("rahul.jpg")
187
+ dravid = Image.open("rahul.jpg")
188
  st.image(dravid,width=150, caption='Rahul Dravid')
189
  elif celeb == "Sachin Tendulkar":
190
+ #sachin = cv2.imread("sachin.jpg")
191
+ sachin = Image.open("sachin.jpg")
192
  st.image(sachin,width=150, caption='Sachin Tendulkar')
193
  elif celeb == "Saurav Ganguly":
194
+ #ganguly = cv2.imread("ganguly.jpg")
195
+ ganguly = Image.open("ganguly.jpg")
196
  st.image(ganguly,width=150, caption='Saurav Ganguly')
197
  elif celeb == "virat_kohli":
198
+ #virat = cv2.imread("virat.jpg")
199
+ virat = Image.open("virat.jpg")
200
  st.image(virat,width=150, caption='Virat Kohli')
201
  elif celeb == "Virendra Sehwag":
202
+ #sehwag = cv2.imread("sehwag.jpg")
203
+ sehwag = Image.open("sehwag.jpg")
204
+ st.image(sehwag,width=150, caption='Virendra Sehwag')
205
  except:
206
  st.header("Image Cannot be Classified!")
207