Spaces:
Sleeping
Sleeping
Pragya Jatav
commited on
Commit
·
d374b1a
1
Parent(s):
7bda0a5
version changes
Browse files- pages/2_Scenario_Planner.py +19 -2
- summary_df.pkl +1 -1
pages/2_Scenario_Planner.py
CHANGED
@@ -1303,6 +1303,7 @@ if auth_status == True:
|
|
1303 |
):
|
1304 |
st.warning("Invalid Input")
|
1305 |
|
|
|
1306 |
status_placeholder = st.empty()
|
1307 |
|
1308 |
# if optimize_placeholder.button("Optimize", use_container_width=True):
|
@@ -1363,9 +1364,16 @@ if auth_status == True:
|
|
1363 |
channel_bounds_max = float(_channel_class.channel_bounds_max)
|
1364 |
min_value = float((1 - channel_bounds_min / 100) * channel_spends)
|
1365 |
max_value = float((1 + channel_bounds_max / 100) * channel_spends)
|
|
|
1366 |
# st.write(min_value)
|
1367 |
# st.write(max_value)
|
1368 |
##print(st.session_state[channel_name])
|
|
|
|
|
|
|
|
|
|
|
|
|
1369 |
_columns_min = st.columns(2)
|
1370 |
with _columns_min[0]:
|
1371 |
spend_input = st.text_input(
|
@@ -1375,11 +1383,16 @@ if auth_status == True:
|
|
1375 |
on_change=partial(update_data, channel_name),
|
1376 |
)
|
1377 |
channel_name_lower_bound = f"{channel_name}_lower_bound"
|
|
|
|
|
|
|
|
|
1378 |
channel_bounds_min = st.text_input(
|
1379 |
"Lower Bound Percentage",
|
1380 |
key = channel_name_lower_bound,
|
1381 |
-
on_change=partial(update_data_bound_min,channel_name)
|
1382 |
)
|
|
|
1383 |
if not validate_input(spend_input):
|
1384 |
st.error("Invalid input")
|
1385 |
|
@@ -1392,10 +1405,14 @@ if auth_status == True:
|
|
1392 |
on_change=partial(update_data_by_percent, channel_name),
|
1393 |
)
|
1394 |
channel_name_upper_bound = f"{channel_name}_upper_bound"
|
|
|
|
|
|
|
|
|
1395 |
channel_bounds_max = st.text_input(
|
1396 |
"Upper Bound Percentage",
|
1397 |
key = channel_name_upper_bound,
|
1398 |
-
on_change=partial(update_data_bound_max,channel_name)
|
1399 |
)
|
1400 |
|
1401 |
with _columns[2]:
|
|
|
1303 |
):
|
1304 |
st.warning("Invalid Input")
|
1305 |
|
1306 |
+
|
1307 |
status_placeholder = st.empty()
|
1308 |
|
1309 |
# if optimize_placeholder.button("Optimize", use_container_width=True):
|
|
|
1364 |
channel_bounds_max = float(_channel_class.channel_bounds_max)
|
1365 |
min_value = float((1 - channel_bounds_min / 100) * channel_spends)
|
1366 |
max_value = float((1 + channel_bounds_max / 100) * channel_spends)
|
1367 |
+
# st.write(channel_spends)
|
1368 |
# st.write(min_value)
|
1369 |
# st.write(max_value)
|
1370 |
##print(st.session_state[channel_name])
|
1371 |
+
|
1372 |
+
|
1373 |
+
|
1374 |
+
|
1375 |
+
|
1376 |
+
|
1377 |
_columns_min = st.columns(2)
|
1378 |
with _columns_min[0]:
|
1379 |
spend_input = st.text_input(
|
|
|
1383 |
on_change=partial(update_data, channel_name),
|
1384 |
)
|
1385 |
channel_name_lower_bound = f"{channel_name}_lower_bound"
|
1386 |
+
|
1387 |
+
if channel_name_lower_bound not in st.session_state:
|
1388 |
+
st.session_state[channel_name_lower_bound] = str(10)
|
1389 |
+
# st.write(st.session_state[channel_name_lower_bound])
|
1390 |
channel_bounds_min = st.text_input(
|
1391 |
"Lower Bound Percentage",
|
1392 |
key = channel_name_lower_bound,
|
1393 |
+
on_change=partial(update_data_bound_min,channel_name)
|
1394 |
)
|
1395 |
+
# st.write(st.session_state[channel_name_lower_bound])
|
1396 |
if not validate_input(spend_input):
|
1397 |
st.error("Invalid input")
|
1398 |
|
|
|
1405 |
on_change=partial(update_data_by_percent, channel_name),
|
1406 |
)
|
1407 |
channel_name_upper_bound = f"{channel_name}_upper_bound"
|
1408 |
+
|
1409 |
+
if channel_name_upper_bound not in st.session_state:
|
1410 |
+
st.session_state[channel_name_upper_bound] = str(10)
|
1411 |
+
|
1412 |
channel_bounds_max = st.text_input(
|
1413 |
"Upper Bound Percentage",
|
1414 |
key = channel_name_upper_bound,
|
1415 |
+
on_change=partial(update_data_bound_max,channel_name)
|
1416 |
)
|
1417 |
|
1418 |
with _columns[2]:
|
summary_df.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 1822
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:10bce0c861df04b0b349bd713006cced672e900b0f7f2cd3cbfcd944db12653d
|
3 |
size 1822
|