File size: 499 Bytes
1f4d06f b48643e 1f4d06f fa819f2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import streamlit as st
import requests
import json
from io import BytesIO
st.title('Face Expression Prediction')
image_file = st.file_uploader("Upload Image")
if image_file is not None:
image = image_file.getvalue()
response = response.post(
"https://dpatel9923-face-expression-prediction1.hf.space/prediction",
files = {
"image": ByteIO(image)
}
)
label = json.loads(response._content)
st.write(f"Expression of Face is {label['label']}") |