Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,11 +28,7 @@ def prediction(price_max,price_step,policy_net):
|
|
28 |
def fun():
|
29 |
st.header("Optimal Price Action")
|
30 |
st.subheader(str(a))
|
31 |
-
|
32 |
-
plt.xlabel("Price action ($)")
|
33 |
-
plt.ylabel("Q ($)")
|
34 |
-
plt.bar(a, b, color='crimson', width=6, alpha=0.8)
|
35 |
-
plt.show()
|
36 |
return
|
37 |
st.header("Enter the Specification")
|
38 |
max_value = st.number_input('Enter the Maximum Value of Price',min_value=50,value = 500,step=1)
|
@@ -40,6 +36,11 @@ step = st.number_input('Enter the Price step',min_value = 10,value = 10,step=1)
|
|
40 |
a,b = prediction(max_value,step,pc2)
|
41 |
if st.button('Predict'):
|
42 |
fun()
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
|
45 |
|
|
|
28 |
def fun():
|
29 |
st.header("Optimal Price Action")
|
30 |
st.subheader(str(a))
|
31 |
+
|
|
|
|
|
|
|
|
|
32 |
return
|
33 |
st.header("Enter the Specification")
|
34 |
max_value = st.number_input('Enter the Maximum Value of Price',min_value=50,value = 500,step=1)
|
|
|
36 |
a,b = prediction(max_value,step,pc2)
|
37 |
if st.button('Predict'):
|
38 |
fun()
|
39 |
+
plt.figure(figsize=(16, 5))
|
40 |
+
plt.xlabel("Price action ($)")
|
41 |
+
plt.ylabel("Q ($)")
|
42 |
+
plt.bar(a, b, color='crimson', width=6, alpha=0.8)
|
43 |
+
plt.show()
|
44 |
|
45 |
|
46 |
|