Skip to content

Commit

Permalink
add footer; improve readme, page title and subheader
Browse files Browse the repository at this point in the history
  • Loading branch information
nwaughachukwuma committed Oct 30, 2024
1 parent 5684801 commit 2b5d162
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
15 changes: 8 additions & 7 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -33,6 +32,8 @@ async def main():
else:
await audioui(uichat)

render_footer()


if __name__ == "__main__":
asyncio.run(main())
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"google-cloud-storage",
"google-api-python-client",
"google-generativeai",
"ruff"
"ruff",
],
classifiers=[
"Development Status :: 3 - Alpha",
Expand Down
2 changes: 1 addition & 1 deletion src/env_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
APP_URL = environ.get("APP_URL", "http://localhost:8501")
3 changes: 2 additions & 1 deletion src/uis/audioui.py
Original file line number Diff line number Diff line change
@@ -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
"""
Expand Down
3 changes: 2 additions & 1 deletion src/uis/chatui.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import streamlit as st
from streamlit.delta_generator import DeltaGenerator

from src.utils.chat_thread import (
evaluate_final_response,
Expand All @@ -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
"""
Expand Down
26 changes: 26 additions & 0 deletions src/uis/footer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import streamlit as st


def render_footer():
st.markdown(
"""
<style>
.footer {
position: fixed;
bottom: 0;
text-align: center;
padding: 1rem;
}
</style>
""",
unsafe_allow_html=True,
)

st.sidebar.markdown(
"""
<div class="footer">
<p> a <a href="https://veedo.ai">veedoai</a> project. (c) 2024 </p>
</div>
""",
unsafe_allow_html=True,
)
2 changes: 1 addition & 1 deletion src/utils/chat_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 2b5d162

Please sign in to comment.