-
Create README.mdโ
import streamlit as st
import cv2
import numpy as np
from deepface import DeepFace
import os
import io
from PIL import Image
import tensorflow as tf
# Suppress TensorFlow and oneDNN warnings
os.environ["TF_ENABLE_ONEDNN_OPTS"] = "0"
tf.get_logger().setLevel('ERROR') # Suppresses most TensorFlow logs
# Set Streamlit page config for theme
st.set_page_config(page_title="Real-Time Emotion Detection", page_icon="๐", layout="wide")
# Custom CSS for background styling
st.markdown(
"""
<style>
body {
background-color: #f0f2f6;
}
.stApp {
background: linear-gradient(to right,rgb(95, 159, 255),rgb(123, 223, 254));
color: white;
}
</style>
""",
unsafe_allow_html=True
)
st.title("๐ Real-Time Emotion Detection")
# Initialize webcam using OpenCV
cap = cv2.VideoCapture(0)
if not cap.isOpened():
st.error("Error: Could not open webcam.")
cap.release()
st.stop()
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "โฆ
-
Upload 400 files
-
Upload 6 files
-
initial commit