corvo7 commited on
Commit
b1148ee
·
verified ·
1 Parent(s): 0849c4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -12,7 +12,11 @@ st.write("welcome to age detection app")
12
 
13
  uploaded_files = st.file_uploader("Choose a image file",type="jpg")
14
 
 
 
 
 
15
  pipe = pipeline("image-classification", model="dima806/facial_age_image_detection")
16
 
17
- st.write(Image.open(uploaded_files))
18
- st.write(pipe(st.image(Image.open(uploaded_files)))[0]["label"])
 
12
 
13
  uploaded_files = st.file_uploader("Choose a image file",type="jpg")
14
 
15
+ if uploaded_files is not None:
16
+ Image=Image.open(uploaded_files)
17
+
18
+
19
  pipe = pipeline("image-classification", model="dima806/facial_age_image_detection")
20
 
21
+
22
+ st.write(pipe(Image)[0]["label"])