diff --git a/README.md b/README.md index 1a7b934..3c50899 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Audiora -> Learn or listen to anything, anytime, through the power of AI-generated audio. +> Listen to anything, anytime, leveraging AI-generated audio. Audiora is an AI-enhanced audio platform that transforms user preferences into personalized engaging audio experiences. diff --git a/app.py b/app.py index bd58ea7..8f9ba89 100644 --- a/app.py +++ b/app.py @@ -5,26 +5,25 @@ from src.uis.audioui import audioui from src.uis.chatui import chatui from src.utils.session_state import init_session_state +from src.uis.footer import render_footer async def main(): - init_session_state() - - # Configure page st.set_page_config(page_title="Audiora", page_icon="🎧", layout="wide") + st.title("🎧 Audiora") + st.subheader("Listen to anything, anytime, leveraging AI") + # Sidebar for content type selection st.sidebar.title("Audiocast Info") + init_session_state() + if st.session_state.content_category: st.sidebar.subheader( f"Content Category: {st.session_state.content_category.capitalize()}" ) - # Main chat interface - st.title("🎧 Audiora") - st.subheader("Learn anything, anytime, through the power of AI-generated audio.") - # Declare chat interface container uichat = st.empty() if not st.session_state.user_specification: @@ -33,6 +32,8 @@ async def main(): else: await audioui(uichat) + render_footer() + if __name__ == "__main__": asyncio.run(main()) diff --git a/setup.py b/setup.py index 7e30ea1..51432f3 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ "google-cloud-storage", "google-api-python-client", "google-generativeai", - "ruff" + "ruff", ], classifiers=[ "Development Status :: 3 - Alpha", diff --git a/src/env_var.py b/src/env_var.py index 10aa247..c8eedfe 100644 --- a/src/env_var.py +++ b/src/env_var.py @@ -12,4 +12,4 @@ GEMINI_API_KEY = environ["GEMINI_API_KEY"] ELEVENLABS_API_KEY = environ["ELEVENLABS_API_KEY"] -APP_URL = environ.get("APP_URL", "http://localhost:8501") \ No newline at end of file +APP_URL = environ.get("APP_URL", "http://localhost:8501") diff --git a/src/uis/audioui.py b/src/uis/audioui.py index 01ce378..424e238 100644 --- a/src/uis/audioui.py +++ b/src/uis/audioui.py @@ -1,10 +1,11 @@ import streamlit as st +from streamlit.delta_generator import DeltaGenerator from src.utils.chat_thread import use_audiocast_request from src.utils.render_audiocast import render_audiocast -async def audioui(uichat=st.empty()): +async def audioui(uichat: DeltaGenerator): """ Audiocast interface """ diff --git a/src/uis/chatui.py b/src/uis/chatui.py index 02b4e35..31bf729 100644 --- a/src/uis/chatui.py +++ b/src/uis/chatui.py @@ -1,4 +1,5 @@ import streamlit as st +from streamlit.delta_generator import DeltaGenerator from src.utils.chat_thread import ( evaluate_final_response, @@ -9,7 +10,7 @@ from src.utils.render_chat import render_chat_history -async def chatui(uichat=st.empty()): +async def chatui(uichat: DeltaGenerator): """ Chat interface """ diff --git a/src/uis/footer.py b/src/uis/footer.py new file mode 100644 index 0000000..fb4c479 --- /dev/null +++ b/src/uis/footer.py @@ -0,0 +1,26 @@ +import streamlit as st + + +def render_footer(): + st.markdown( + """ + + """, + unsafe_allow_html=True, + ) + + st.sidebar.markdown( + """ +
+ """, + unsafe_allow_html=True, + ) diff --git a/src/utils/chat_utils.py b/src/utils/chat_utils.py index 2322911..6942bfb 100644 --- a/src/utils/chat_utils.py +++ b/src/utils/chat_utils.py @@ -60,7 +60,7 @@ class SessionChatRequest(BaseModel): def display_example_cards(): """Display example content cards if there are no messages""" - st.markdown("#### You can start with one of the following") + st.markdown("##### You can start with one of the following") # CSS for fixed-height buttons and responsive columns st.markdown(