dpatel9923 commited on
Commit
1f4d06f
·
verified ·
1 Parent(s): c953c3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -20
app.py CHANGED
@@ -1,21 +1,21 @@
1
- import streamlit as st
2
- import requests
3
- import json
4
- from io import BytesIO
5
-
6
- st.title('Face Expression Prediction')
7
-
8
- image_file = st.file_uploader("Upload Image")
9
-
10
- if image_file is not None:
11
- image = image_file.getvalue()
12
-
13
- response = response.post(
14
- "https://dpatel9923",
15
- files = {
16
- "image": ByteIO(image)
17
- }
18
- )
19
-
20
- label = json.loads(response._content)
21
  st.write(f"Expression of Face is {label['label']}")
 
1
+ import streamlit as st
2
+ import requests
3
+ import json
4
+ from io import BytesIO
5
+
6
+ st.title('Face Expression Prediction')
7
+
8
+ image_file = st.file_uploader("Upload Image")
9
+
10
+ if image_file is not None:
11
+ image = image_file.getvalue()
12
+
13
+ response = response.post(
14
+ "https://dpatel9923-face-expression-prediction.hf.space/prediction",
15
+ files = {
16
+ "image": ByteIO(image)
17
+ }
18
+ )
19
+
20
+ label = json.loads(response._content)
21
  st.write(f"Expression of Face is {label['label']}")