corvo7 commited on
Commit
fc33888
·
verified ·
1 Parent(s): f73125b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2,11 +2,13 @@ import streamlit as st
2
  from transformers import pipeline
3
  import numpy
4
  import torch
 
5
 
6
  st.write("welcome to age detection app")
7
 
8
  uploaded_files = st.file_uploader("Choose a image file")
9
 
 
10
  pipe = pipeline("image-classification", model="dima806/facial_age_image_detection")
11
 
12
- st.write(pipe(uploaded_files)[0]["label"])
 
2
  from transformers import pipeline
3
  import numpy
4
  import torch
5
+ import PIL
6
 
7
  st.write("welcome to age detection app")
8
 
9
  uploaded_files = st.file_uploader("Choose a image file")
10
 
11
+
12
  pipe = pipeline("image-classification", model="dima806/facial_age_image_detection")
13
 
14
+ st.write(pipe(st.image(uploaded_files))[0]["label"])