saritha5 commited on
Commit
a54869e
·
1 Parent(s): 91b1fc9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -22,7 +22,8 @@ def prediction(price_max,price_step,policy_net):
22
  1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]
23
  Q_s = policy_net(to_tensor(sample_state))
24
  a_opt = Q_s.max(0)[1].detach()
25
- print(f'Optimal price action {price_grid[a_opt]}')
 
26
  plt.figure(figsize=(16, 5))
27
  plt.xlabel("Price action ($)")
28
  plt.ylabel("Q ($)")
 
22
  1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]
23
  Q_s = policy_net(to_tensor(sample_state))
24
  a_opt = Q_s.max(0)[1].detach()
25
+ st.header('Optimal price action')
26
+ st.write(str(price_grid[a_opt])
27
  plt.figure(figsize=(16, 5))
28
  plt.xlabel("Price action ($)")
29
  plt.ylabel("Q ($)")