Skip to content

Commit

Permalink
fix: add error handling for empty metadata fetch in Streamlit display
Browse files Browse the repository at this point in the history
yzqzss, bad!
  • Loading branch information
Ovler-Young committed Nov 20, 2024
1 parent 9ee5404 commit 0ed3a2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ia_collection_analyzer/streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
)
items = fetch_metadata(collection_id)
items_pd = pd.DataFrame(items)
if items_pd.empty:
st.error("Failed to fetch metadata for the collection. Please check the collection ID.")
st.stop()

data_transform_text = st.text("cleaning data...")
# drop columns with 80%+ nan
Expand Down

0 comments on commit 0ed3a2d

Please sign in to comment.