Skip to content

Commit

Permalink
Refactor chat and audiocast interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nwaughachukwuma committed Oct 29, 2024
1 parent bacce42 commit 0349be7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
21 changes: 10 additions & 11 deletions src/uis/audioui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@

async def audioui(uichat=st.empty()):
"""
Main chat interface
Audiocast interface
"""
uichat.chat_input("What would you like to listen to?", disabled=True)
uichat.empty()

with st.container():
if not st.session_state.current_audiocast:
st.info("Using your audiocast specifications")

summary = st.session_state.user_specification
content_category = st.session_state.content_category
await use_audiocast_request(summary, content_category)
else:
st.info("Audiocast generation completed!")
render_audiocast()
if not st.session_state.current_audiocast:
st.info("Using your audiocast specifications")
summary = st.session_state.user_specification
content_category = st.session_state.content_category
await use_audiocast_request(summary, content_category)
else:
st.info("Audiocast generation completed!")
render_audiocast()
2 changes: 1 addition & 1 deletion src/uis/chatui.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

async def chatui(uichat=st.empty()):
"""
chat interface
Chat interface
"""
st.write(
"Tell me what you'd like to listen to, and I'll create an audiocast for you!"
Expand Down
2 changes: 1 addition & 1 deletion src/utils/render_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def render_chat_history():
"""
Render chat history
"""
st.info("Chat session to understand your content preferences")
st.info("Chat session to understand your preferences")

with st.chat_message("user"):
message = st.session_state.messages[0]
Expand Down

0 comments on commit 0349be7

Please sign in to comment.