ldhldh commited on
Commit
65c0c64
·
1 Parent(s): 0c4c355

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -74
app.py CHANGED
@@ -6,81 +6,7 @@ from PIL import Image
6
  import copy
7
  import time
8
  from time import strftime, localtime
9
- from streamlit_js_eval import streamlit_js_eval
10
 
11
-
12
- if st.button("Reload page"):
13
- sample_data = {
14
- "gpus" : {
15
- "Alice" : 1,
16
- "Tom" : 8,
17
- "Bob" : 2,
18
- "Nee" : 6
19
- },
20
- "total" : {
21
- "total" : 28,
22
- "used" : 12
23
- },
24
- "chain" : [
25
- {
26
- 'index': 1,
27
- 'timestamp': 1701025843.5186985,
28
- 'transactions': [],
29
- 'previous_hash': '1'
30
- },
31
- {
32
- 'index': 2,
33
- 'timestamp': 1701037845.518921,
34
- 'transactions': [
35
- {'id': 'Alice', 'kind': 'add', 'data': '16'},
36
- {'id': 'bob', 'kind': 'add', 'data': '16'},
37
- {'id': 'Alice', 'kind': 'inference', 'data': 'Hello?'},
38
- {'id': 'Alice', 'kind': 'add', 'data': '16'},
39
- {'id': 'bob', 'kind': 'inference', 'data': '16'}
40
- ],
41
- 'previous_hash':'5199cc3018287cf3f5fffbb0d1ae3f949256774a2347401818bdc93d29c379e8'
42
- },
43
- {
44
- 'index': 3,
45
- 'timestamp': 1701147846.535392,
46
- 'transactions': [
47
- {'id': 'Alice', 'kind': 'add', 'data': '16'},
48
- {'id': 'TOM', 'kind': 'add', 'data': '8'},
49
- {'id': 'Alice', 'kind': 'inference', 'data': 'Hello?'},
50
- {'id': 'Alice', 'kind': 'inference', 'data': '16'},
51
- {'id': 'bob', 'kind': 'inference', 'data': '0'}
52
- ],
53
- 'previous_hash':'5199cc3018287cf3f5fffbb0d1ae3f949256774a2347401818bdc93d29c379e8'
54
- },
55
- {
56
- 'index': 4,
57
- 'timestamp': 1701157947.545325,
58
- 'transactions': [
59
- {'id': 'Alice', 'kind': 'inference', 'data': '16'},
60
- {'id': 'bob', 'kind': 'inference', 'data': '16'},
61
- {'id': 'Alice', 'kind': 'inference', 'data': 'Hello?'},
62
- {'id': 'Alice', 'kind': 'inference', 'data': '16'},
63
- {'id': 'Nee', 'kind': 'add', 'data': '16'}
64
- ],
65
- 'previous_hash':'5199cc3018287cf3f5fffbb0d1ae3f949256774a2347401818bdc93d29c379e8'
66
- },
67
- {
68
- 'index': 5,
69
- 'timestamp': 1701057969.582371,
70
- 'transactions': [
71
- {'id': 'Alice', 'kind': 'add', 'data': '16'},
72
- {'id': 'bob', 'kind': 'inference', 'data': '16'},
73
- {'id': 'Alice', 'kind': 'inference', 'data': 'Hello?'},
74
- {'id': 'Alice', 'kind': 'inference', 'data': '16'},
75
- {'id': 'bob', 'kind': 'inference', 'data': '16'}
76
- ],
77
- 'previous_hash':'5199cc3018287cf3f5fffbb0d1ae3f949256774a2347401818bdc93d29c379e8'
78
- },
79
-
80
- ]
81
- }
82
- streamlit_js_eval(js_expressions="parent.window.location.reload()")
83
-
84
  sample_data = {
85
  "gpus" : {
86
  "Alice" : 32,
 
6
  import copy
7
  import time
8
  from time import strftime, localtime
 
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  sample_data = {
11
  "gpus" : {
12
  "Alice" : 32,