ldhldh commited on
Commit
770b6d4
·
1 Parent(s): 98f237f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -21,7 +21,7 @@ sample_data = {
21
  "chain" : [
22
  {
23
  'index': 1,
24
- 'timestamp': 1701157843.5186985,
25
  'transactions': [],
26
  'previous_hash': '1'
27
  },
@@ -51,7 +51,7 @@ sample_data = {
51
  },
52
  {
53
  'index': 4,
54
- 'timestamp': 1701157847.545325,
55
  'transactions': [
56
  {'id': 'Alice', 'kind': 'inference', 'data': '16'},
57
  {'id': 'bob', 'kind': 'inference', 'data': '16'},
@@ -63,7 +63,7 @@ sample_data = {
63
  },
64
  {
65
  'index': 5,
66
- 'timestamp': 1701157849.582371,
67
  'transactions': [
68
  {'id': 'Alice', 'kind': 'out', 'data': '16'},
69
  {'id': 'bob', 'kind': 'out', 'data': '16'},
@@ -97,7 +97,7 @@ for block in sample_data['chain']:
97
  name_list.append(t['id'])
98
 
99
  timestamp_gpu_data = [[0 for _ in range(len(name_list))]]
100
- timestamp_list_date = [1701154321.5186985, sample_data['chain'][0]['timestamp']]
101
 
102
  for block in sample_data['chain']:
103
  temp = timestamp_gpu_data[int(block['index']) - 1]
@@ -129,7 +129,7 @@ timestamp_list_date_str = []
129
  for d in timestamp_list_date:
130
  timestamp_list_date_str.append(strftime('%Y-%m-%d', localtime( d )))
131
  call_data = pd.DataFrame(timestamp_inference_data, columns = ["inference call"], index = timestamp_list_date_str)
132
- st.bar_chart(call_data, width=2)
133
 
134
 
135
  class BubbleChart:
 
21
  "chain" : [
22
  {
23
  'index': 1,
24
+ 'timestamp': 1701155843.5186985,
25
  'transactions': [],
26
  'previous_hash': '1'
27
  },
 
51
  },
52
  {
53
  'index': 4,
54
+ 'timestamp': 1701157947.545325,
55
  'transactions': [
56
  {'id': 'Alice', 'kind': 'inference', 'data': '16'},
57
  {'id': 'bob', 'kind': 'inference', 'data': '16'},
 
63
  },
64
  {
65
  'index': 5,
66
+ 'timestamp': 1701157969.582371,
67
  'transactions': [
68
  {'id': 'Alice', 'kind': 'out', 'data': '16'},
69
  {'id': 'bob', 'kind': 'out', 'data': '16'},
 
97
  name_list.append(t['id'])
98
 
99
  timestamp_gpu_data = [[0 for _ in range(len(name_list))]]
100
+ timestamp_list_date = [1701151321.5186985, sample_data['chain'][0]['timestamp']]
101
 
102
  for block in sample_data['chain']:
103
  temp = timestamp_gpu_data[int(block['index']) - 1]
 
129
  for d in timestamp_list_date:
130
  timestamp_list_date_str.append(strftime('%Y-%m-%d', localtime( d )))
131
  call_data = pd.DataFrame(timestamp_inference_data, columns = ["inference call"], index = timestamp_list_date_str)
132
+ st.bar_chart(call_data)
133
 
134
 
135
  class BubbleChart: