Jay-Rajput commited on
Commit
b7c9382
Β·
1 Parent(s): a40ed92
Files changed (1) hide show
  1. app.py +8 -2
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, Invalid bid! πŸ™ˆ You must bid at least 100 points and not exceed the 20% limit of your total points. Maximum allowed bid points: {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,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("Bid Points", min_value=min_bid_points, value=min_bid_points, format="%d")
 
 
 
 
 
 
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)