File size: 736 Bytes
1128db7 d504b9a 1128db7 d504b9a 1128db7 d504b9a 1128db7 d504b9a 1128db7 d504b9a 1128db7 d504b9a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import altair as alt
import numpy as np
import pandas as pd
import streamlit as st
import streamlit as st
from emotion_detector import detect_emotion
st.set_page_config(page_title="Real-Time Emotion to Emoji", page_icon="π§")
st.title("π§ Real-Time Emotion to Emoji")
st.markdown("""
Upload a 5-second **WAV** audio clip of your voice, and the AI will detect your emotion and show an emoji!
""")
uploaded_file = st.file_uploader("π€ Upload your 5-second WAV audio", type=["wav"])
if uploaded_file is not None:
st.audio(uploaded_file, format='audio/wav')
with st.spinner("Detecting emotion..."):
emotion, emoji = detect_emotion(uploaded_file)
st.markdown(f"## {emoji} Emotion: **{emotion.title()}**")
|