Spaces:
Sleeping
Sleeping
Commit
Β·
b7c9382
1
Parent(s):
a40ed92
enhance
Browse files
app.py
CHANGED
|
@@ -152,7 +152,7 @@ def submit_prediction(
|
|
| 152 |
return
|
| 153 |
|
| 154 |
if bid_points > max_bid_points or bid_points <= 0:
|
| 155 |
-
st.error(f"Oops,
|
| 156 |
# st.error(f"Oops! π Looks like you're going overboard with your bid points! Your bid points cannot exceed your total points. Maximum allowed bid points: {max_bid_points} π±")
|
| 157 |
return
|
| 158 |
|
|
@@ -256,7 +256,13 @@ def user_selection_and_prediction():
|
|
| 256 |
players = player_list[predicted_winner]
|
| 257 |
predicted_motm = st.selectbox("Predicted Man of the Match", players)
|
| 258 |
|
| 259 |
-
bid_points = st.number_input(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 260 |
|
| 261 |
if st.button("Submit Prediction"):
|
| 262 |
submit_prediction(user_name, match_id, predicted_winner, predicted_motm, bid_points, max_bid_points)
|
|
|
|
| 152 |
return
|
| 153 |
|
| 154 |
if bid_points > max_bid_points or bid_points <= 0:
|
| 155 |
+
st.error(f"Oops, invalid bid! You must bid at least 10% and not more than 50% of your points. Maximum allowed: {max_bid_points}")
|
| 156 |
# st.error(f"Oops! π Looks like you're going overboard with your bid points! Your bid points cannot exceed your total points. Maximum allowed bid points: {max_bid_points} π±")
|
| 157 |
return
|
| 158 |
|
|
|
|
| 256 |
players = player_list[predicted_winner]
|
| 257 |
predicted_motm = st.selectbox("Predicted Man of the Match", players)
|
| 258 |
|
| 259 |
+
bid_points = st.number_input(
|
| 260 |
+
"Bid Points",
|
| 261 |
+
min_value=int(min_bid_points),
|
| 262 |
+
max_value=int(max_bid_points),
|
| 263 |
+
value=int(min_bid_points),
|
| 264 |
+
format="%d"
|
| 265 |
+
)
|
| 266 |
|
| 267 |
if st.button("Submit Prediction"):
|
| 268 |
submit_prediction(user_name, match_id, predicted_winner, predicted_motm, bid_points, max_bid_points)
|