Reduce execution time due to the sleep
Browse files
app.py
CHANGED
@@ -85,9 +85,10 @@ def main():
|
|
85 |
with st.spinner("Predicting..."):
|
86 |
# Simulate a long-running process
|
87 |
progress_bar = st.progress(0)
|
88 |
-
|
|
|
89 |
time.sleep(0.1)
|
90 |
-
progress_bar.progress(i +
|
91 |
|
92 |
output_df, probabilities = predict_sepsis(input_data)
|
93 |
|
|
|
85 |
with st.spinner("Predicting..."):
|
86 |
# Simulate a long-running process
|
87 |
progress_bar = st.progress(0)
|
88 |
+
step = 20 # A big step will reduce the execution time
|
89 |
+
for i in range(0, 100, step):
|
90 |
time.sleep(0.1)
|
91 |
+
progress_bar.progress(i + step)
|
92 |
|
93 |
output_df, probabilities = predict_sepsis(input_data)
|
94 |
|