ibrahim321123 commited on
Commit
e0b5771
·
verified ·
1 Parent(s): b1c40bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -10
app.py CHANGED
@@ -44,7 +44,7 @@ uploaded_file = st.file_uploader("Upload your selfie", type=["jpg", "png", "jpeg
44
 
45
  if uploaded_file is not None:
46
  # Show uploaded image
47
- st.image(uploaded_file, caption="Uploaded Image", use_column_width=True)
48
  st.info("Detecting emotion... please wait...")
49
 
50
  # Save file locally
@@ -58,15 +58,7 @@ if uploaded_file is not None:
58
  api_name="/preprocess_image_and_predict"
59
  )
60
 
61
- face_image, heatmap_image, confidences = result
62
-
63
- # Show face & heatmap
64
- st.image(face_image, caption="Detected Face", use_column_width=True)
65
- st.image(heatmap_image, caption="Heatmap", use_column_width=True)
66
-
67
- # Show probabilities
68
- st.subheader("Emotion Probabilities")
69
- st.json(confidences)
70
 
71
  # Use top label directly
72
  dominant = confidences["label"]
 
44
 
45
  if uploaded_file is not None:
46
  # Show uploaded image
47
+ st.image(uploaded_file, caption="Uploaded Image", use_container_width=True)
48
  st.info("Detecting emotion... please wait...")
49
 
50
  # Save file locally
 
58
  api_name="/preprocess_image_and_predict"
59
  )
60
 
61
+ _, _, confidences = result
 
 
 
 
 
 
 
 
62
 
63
  # Use top label directly
64
  dominant = confidences["label"]