saritha5 commited on
Commit
ae731d9
·
1 Parent(s): 507b4ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -28,14 +28,18 @@ def prediction(price_max,price_step,policy_net):
28
  #t.bar_chart(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)
34
  a = prediction(max_value,step,pc2)
35
- result = st.button("Predict")
36
- st.write(result)
37
- st.header('Optimal Price Action')
38
- st.subheader(str(a))
39
 
40
 
41
 
 
28
  #t.bar_chart(price_grid, Q_s.detach().numpy(), color='crimson', width=6, alpha=0.8)
29
  #plt.show()
30
  return price_grid[a_opt]
31
+ def fun():
32
+ st.header('Optimal Price Action)
33
+ st.subheader(str(a))
34
+ return
35
+ st.header('Enter the Specification)
36
+ max_value = st.number_input('Enter the Maximum Value of Price',min_value=50,value = 500,step=1)
37
  step = st.number_input('Enter the Price step',min_value = 10,value = 10,step=1)
38
  a = prediction(max_value,step,pc2)
39
+ if st.button('Predict'):
40
+ fun()
41
+
42
+
43
 
44
 
45