Spaces:
Sleeping
Sleeping
Commit
·
c50adda
1
Parent(s):
5de2488
Update app.py
Browse files
app.py
CHANGED
@@ -50,17 +50,17 @@ st.markdown(
|
|
50 |
'Simulate A/B optimization with policy gradient reinforcement learning')
|
51 |
|
52 |
|
53 |
-
learning_rate = st.text_input('Learning rate', value=0.1)
|
54 |
|
55 |
-
prob_A = st.text_input('Click probability of ad A', value=0.4)
|
56 |
|
57 |
-
prob_B = st.text_input('Click probability of ad B', value=0.5)
|
58 |
|
59 |
epochs = int(st.text_input('Number of ad impressions (epochs)', value=2000))
|
60 |
|
61 |
information_for_plotting = np.zeros((epochs, 10))
|
62 |
|
63 |
-
if st.button('
|
64 |
|
65 |
with st.spinner('Simulating the ad campaign may take a few seconds ...'):
|
66 |
|
|
|
50 |
'Simulate A/B optimization with policy gradient reinforcement learning')
|
51 |
|
52 |
|
53 |
+
learning_rate = float(st.text_input('Learning rate', value=0.1))
|
54 |
|
55 |
+
prob_A = float(st.text_input('Click probability of ad A', value=0.4))
|
56 |
|
57 |
+
prob_B = float(st.text_input('Click probability of ad B', value=0.5))
|
58 |
|
59 |
epochs = int(st.text_input('Number of ad impressions (epochs)', value=2000))
|
60 |
|
61 |
information_for_plotting = np.zeros((epochs, 10))
|
62 |
|
63 |
+
if st.button('Run the ad campaign and display the results'):
|
64 |
|
65 |
with st.spinner('Simulating the ad campaign may take a few seconds ...'):
|
66 |
|