File size: 383 Bytes
2b565c4
 
b3c1a68
2b565c4
 
 
 
b3c1a68
2b565c4
 
b3c1a68
2b565c4
b3c1a68
8daf463
b3c1a68
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from transformers import pipeline
import numpy
import torch
import matplotlib.pyplot
import PIL
from PIL import Image
import streamlit as st

st.write('age detection')
upload_file = st.file_uploader('choose a image file',type='jpg')

pipe = pipeline("image-classifcation",model='dima806/facial_age_image_detection')

st.write(pipe(st.image(Image.open(upload_file)))[0]['label'])