Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,13 +22,12 @@ 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 |
-
|
27 |
-
plt.
|
28 |
-
plt.
|
29 |
-
plt.
|
30 |
-
|
31 |
-
plt.show()
|
32 |
st.header('Enter the Spectification')
|
33 |
max_value = st.number_input('Enter the Maximun Value of Price',min_value=50,value = 500,step=1)
|
34 |
step = st.number_input('Enter the Price step',min_value = 10,value = 10,step=1)
|
|
|
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 |
+
#plt.figure(figsize=(16, 5))
|
26 |
+
#plt.xlabel("Price action ($)")
|
27 |
+
#plt.ylabel("Q ($)")
|
28 |
+
#plt.bar(price_grid, Q_s.detach().numpy(), color='crimson', width=6, alpha=0.8)
|
29 |
+
#plt.show()
|
30 |
+
return price_grid[a_opt]
|
|
|
31 |
st.header('Enter the Spectification')
|
32 |
max_value = st.number_input('Enter the Maximun Value of Price',min_value=50,value = 500,step=1)
|
33 |
step = st.number_input('Enter the Price step',min_value = 10,value = 10,step=1)
|