Skip to content

Commit

Permalink
Fix key error in web app
Browse files Browse the repository at this point in the history
  • Loading branch information
paulovcmedeiros committed Feb 25, 2024
1 parent 984192e commit efea4a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license = "MIT"
name = "pyrobbot"
readme = "README.md"
version = "0.6.4"
version = "0.7.0"

[build-system]
build-backend = "poetry.core.masonry.api"
Expand Down
7 changes: 4 additions & 3 deletions pyrobbot/app/app_page_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,10 @@ def _render_chatbot_page(self):
self.sidebar_title = title
title_container.header(title, divider="rainbow")

# Need to delete the audiorecorder widget from the session state to prevent the
# previous audio from being used as input again
del st.session_state[f"audiorecorder_widget_{self.page_id}"]
with contextlib.suppress(KeyError):
# Need to delete the audiorecorder widget from the session state to prevent
# the previous audio from being used as input again
del st.session_state[f"audiorecorder_widget_{self.page_id}"]

def render(self):
"""Render the app's chatbot or costs page, depending on user choice."""
Expand Down

0 comments on commit efea4a3

Please sign in to comment.