Spaces:
Build error
Build error
| import streamlit as st | |
| import re | |
| import pandas as pd | |
| import numpy as np | |
| import time | |
| import torch | |
| # Streamlit app | |
| st.title("Private Sample") | |
| progress_bar = st.progress(0) | |
| status_text = st.empty() | |
| chart = st.line_chart(np.random.randn(10, 2)) | |
| for i in range(100): | |
| # Update progress bar. | |
| progress_bar.progress(i + 1) | |
| new_rows = np.random.randn(10, 2) | |
| # Update status text. | |
| status_text.text( | |
| 'The latest random number is: %s' % new_rows[-1, 1]) | |
| # Append data to the chart. | |
| chart.add_rows(new_rows) | |
| # Pretend we're doing some computation that takes time. | |
| time.sleep(0.1) | |
| status_text.text('Done!') | |
| st.balloons() | |