Skip to content

Commit

Permalink
feat: handle division by zero in progress calculation for improved st…
Browse files Browse the repository at this point in the history
…ability
  • Loading branch information
Ovler-Young committed Nov 19, 2024
1 parent 9d88cf7 commit 0c0c3bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ia_collection_analyzer/streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
def progress_hook(add, total):
global current_progress
current_progress += add
progress = current_progress / total
if total == 0:
progress = 0
else:
progress = current_progress / total
current_time = time.time()
elapsed_time = current_time - start_time

Expand Down

0 comments on commit 0c0c3bf

Please sign in to comment.