Skip to content

Commit

Permalink
Streamlit formatting
Browse files Browse the repository at this point in the history
Added nice formatting for throwing error.
  • Loading branch information
Cox, Jordan authored and Cox, Jordan committed Dec 6, 2023
1 parent 5a5a848 commit 526e7e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/energy_wizard/run_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ def get_corpus():
@st.cache_resource
def get_wizard():
"""Get the energy wizard object."""
"""Getting Corpus of data. If no corpus throw error for user to run retrieve docs."""

#Getting Corpus of data. If no corpus throw error for user to run retrieve docs.
try:
corpus = get_corpus()
except:
print("Error: No Corpus. Have you run 'retrieve_docs.py'?")
st.header("Error")
st.write("Error: No Corpus. Have you run 'retrieve_docs.py'?")
sys.exit()

Expand Down

0 comments on commit 526e7e2

Please sign in to comment.