File size: 448 Bytes
94a4f55
 
 
 
013cf16
 
 
 
142ec37
94a4f55
 
 
307f4bf
94a4f55
b1148ee
 
 
 
94a4f55
 
b1148ee
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import streamlit as st
from transformers import pipeline
import numpy
import torch
import matplotlib.pyplot
import PIL
from PIL import Image



st.write("welcome to age detection app")

uploaded_files = st.file_uploader("Choose a image file",type="jpg")

if uploaded_files is not None:
    Image=Image.open(uploaded_files)
    

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


st.write(pipe(Image)[0]["label"])