-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStreamlit__v02B.py
41 lines (32 loc) · 973 Bytes
/
Streamlit__v02B.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 14 16:14:48 2024
@author: parallels
"""
import numpy as np
import streamlit as st
import time
# Set the title and favicon that appear in the Browser's tab bar.
st.set_page_config(page_title='La page du lapin MAUVE et son dashboard inutile')
progress_bar = st.sidebar.progress(0)
status_text = st.sidebar.empty()
last_rows = np.random.randn(1, 1)
chart = st.line_chart(last_rows)
for i in range(1, 101):
new_rows = last_rows[-1, :] + np.random.randn(5, 1).cumsum(axis=0)
status_text.text("%i%% Complete" % i)
chart.add_rows(new_rows)
progress_bar.progress(i)
last_rows = new_rows
time.sleep(0.05)
progress_bar.empty()
CTN = 0
while(1):
CTN+= 1
chart.title(str(CTN))
time.sleep(10)
# Streamlit widgets automatically run the script from top to bottom. Since
# this button is not connected to any other logic, it just causes a plain
# rerun.
st.button("Re-run")