Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
| 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 ($)")
|