import asyncio | |
import sys | |
import streamlit as st | |
import os | |
from pathlib import Path | |
try: | |
asyncio.get_running_loop() | |
except RuntimeError: | |
asyncio.set_event_loop(asyncio.new_event_loop()) | |
sys.path.append(str(Path(__file__).parent)) | |
def main(): | |
st.set_page_config( | |
page_title="Audio Emotion Recognition System", | |
page_icon="π΅", | |
layout="wide" | |
) | |
st.sidebar.title("Navigation Bar") | |
st.sidebar.markdown("<small>(Chatbot is not available now, update soon...π)</small>", unsafe_allow_html=True) | |
app_mode = st.sidebar.radio("Go to", ["Emotion Analyzer", "Chatbot"]) | |
if app_mode == "Emotion Analyzer": | |
from emotion_analyzer import show # η΄ζ₯ε―Όε ₯樑ε | |
show() | |
elif app_mode == "Chatbot": | |
st.write("Chatbot is not available now, update soon...π") | |
if __name__ == "__main__": | |
main() |