Jay-Rajput commited on
Commit
054c4c5
·
1 Parent(s): 9cbfc91

Adding wildcard

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -246,16 +246,17 @@ def load_bonus(BONUS_JSON):
246
 
247
 
248
  def user_selection_and_prediction():
249
- users = list(load_data(USERS_JSON))
 
250
  user_name = st.selectbox("Select User", ["Select a user..."] + users)
251
 
252
  min_bid_points, max_bid_points = None, None
253
  if user_name != "Select a user...":
254
  min_bid_points, max_bid_points = calculate_min_max_bid_points(user_name)
255
  st.write(f"Bid points range you can submit: {min_bid_points} to {max_bid_points}")
256
-
257
  # Load user wildcard status
258
- user_wildcards = users.get(user_name, {}).get('wildcard', [0, 0, 0])
259
  available_wildcards = []
260
 
261
  if user_wildcards[0] == 0:
 
246
 
247
 
248
  def user_selection_and_prediction():
249
+ users_data = load_users(USERS_JSON)
250
+ users = list(users_data)
251
  user_name = st.selectbox("Select User", ["Select a user..."] + users)
252
 
253
  min_bid_points, max_bid_points = None, None
254
  if user_name != "Select a user...":
255
  min_bid_points, max_bid_points = calculate_min_max_bid_points(user_name)
256
  st.write(f"Bid points range you can submit: {min_bid_points} to {max_bid_points}")
257
+
258
  # Load user wildcard status
259
+ user_wildcards = users_data.get(user_name, {}).get('wildcard', [0, 0, 0])
260
  available_wildcards = []
261
 
262
  if user_wildcards[0] == 0: