ldhldh commited on
Commit
66a541b
·
1 Parent(s): 8edbd2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +37 -0
app.py CHANGED
@@ -8,6 +8,43 @@ chart_data = pd.DataFrame(np.random.randn(20, 3), columns=["a", "b", "c"])
8
 
9
  st.area_chart(chart_data)
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  class BubbleChart:
12
  def __init__(self, data, bubble_spacing=0, n_bins=5):
13
 
 
8
 
9
  st.area_chart(chart_data)
10
 
11
+
12
+ sample_data = {
13
+ "gpus" : {
14
+ "A" : 16,
15
+ "B" : 4,
16
+ "C" : 2,
17
+ "D" : 6
18
+ },
19
+ "total" : {
20
+ "total" : 28,
21
+ "used" : 12
22
+ },
23
+ "chain" : [
24
+ {
25
+ 'index': 1,
26
+ 'timestamp': 1701157843.5186985,
27
+ 'transactions': [],
28
+ 'previous_hash': '1'
29
+ },
30
+ {
31
+ 'index': 2,
32
+ 'timestamp': 1701157843.518921,
33
+ 'transactions': [
34
+ {'id': 'Alice', 'kind': 'add', 'data': '16'},
35
+ {'id': 'bob', 'kind': 'add', 'data': '16'},
36
+ {'id': 'Alice', 'kind': 'inference', 'data': 'Hello?'},
37
+ {'id': 'Alice', 'kind': 'add', 'data': '16'},
38
+ {'id': 'bob', 'kind': 'add', 'data': '16'}
39
+ ],
40
+ 'previous_hash':'5199cc3018287cf3f5fffbb0d1ae3f949256774a2347401818bdc93d29c379e8'
41
+ },
42
+ {
43
+ 'index': 3,
44
+ 'timestamp': 1701157843.519178, 'transactions': [{'id': 'Alice', 'kind': 'out', 'data': '16'}, {'id': 'bob', 'kind': 'out', 'data': '16'}, {'id': 'Alice', 'kind': 'inference', 'data': 'Hello?'}], 'previous_hash': '5f687914df0b83fa98a366d5af764e0a19a2b78c17c149ac23684f310452faba'}
45
+ ]
46
+ }
47
+
48
  class BubbleChart:
49
  def __init__(self, data, bubble_spacing=0, n_bins=5):
50