Spaces:
Sleeping
Sleeping
updating app
Browse files
app.py
CHANGED
|
@@ -12,13 +12,13 @@ import tempfile
|
|
| 12 |
|
| 13 |
# Set page config
|
| 14 |
st.set_page_config(
|
| 15 |
-
page_title="
|
| 16 |
page_icon="😀",
|
| 17 |
layout="wide"
|
| 18 |
)
|
| 19 |
|
| 20 |
# --- App Title and Description ---
|
| 21 |
-
st.title("
|
| 22 |
st.write("""
|
| 23 |
This app detects emotions in real-time using webcam, video files, or images.
|
| 24 |
If your webcam isn't working, try the simulation mode or upload a video file.
|
|
@@ -56,7 +56,7 @@ selected_model = st.sidebar.selectbox(
|
|
| 56 |
# Input method selection with addition of video upload and simulation
|
| 57 |
input_method = st.sidebar.radio(
|
| 58 |
"Choose Input Method",
|
| 59 |
-
["Real-time Webcam", "Upload
|
| 60 |
)
|
| 61 |
|
| 62 |
# Confidence threshold
|
|
@@ -71,16 +71,6 @@ confidence_threshold = st.sidebar.slider(
|
|
| 71 |
# Face detection toggle
|
| 72 |
use_face_detection = st.sidebar.checkbox("Enable Face Detection", value=True)
|
| 73 |
|
| 74 |
-
# Processing speed for video/simulation
|
| 75 |
-
if input_method in ["Upload Video", "Simulation Mode"]:
|
| 76 |
-
processing_speed = st.sidebar.slider(
|
| 77 |
-
"Processing Speed",
|
| 78 |
-
min_value=0.1,
|
| 79 |
-
max_value=2.0,
|
| 80 |
-
value=1.0,
|
| 81 |
-
step=0.1,
|
| 82 |
-
help="Adjust the speed of video processing (higher is faster)"
|
| 83 |
-
)
|
| 84 |
|
| 85 |
# History length for real-time tracking
|
| 86 |
if input_method in ["Real-time Webcam", "Upload Video", "Simulation Mode"]:
|
|
|
|
| 12 |
|
| 13 |
# Set page config
|
| 14 |
st.set_page_config(
|
| 15 |
+
page_title="Emotion Detection",
|
| 16 |
page_icon="😀",
|
| 17 |
layout="wide"
|
| 18 |
)
|
| 19 |
|
| 20 |
# --- App Title and Description ---
|
| 21 |
+
st.title("Emotion Detection")
|
| 22 |
st.write("""
|
| 23 |
This app detects emotions in real-time using webcam, video files, or images.
|
| 24 |
If your webcam isn't working, try the simulation mode or upload a video file.
|
|
|
|
| 56 |
# Input method selection with addition of video upload and simulation
|
| 57 |
input_method = st.sidebar.radio(
|
| 58 |
"Choose Input Method",
|
| 59 |
+
["Real-time Webcam", "Upload an Image", "Capture Image"]
|
| 60 |
)
|
| 61 |
|
| 62 |
# Confidence threshold
|
|
|
|
| 71 |
# Face detection toggle
|
| 72 |
use_face_detection = st.sidebar.checkbox("Enable Face Detection", value=True)
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
# History length for real-time tracking
|
| 76 |
if input_method in ["Real-time Webcam", "Upload Video", "Simulation Mode"]:
|