awacke1 commited on
Commit
91a5ba3
·
1 Parent(s): 488f16a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -65,17 +65,16 @@ def boggle(size, time_limit):
65
  st.write(board_df)
66
  words = set()
67
  start_time = time.time()
 
68
 
69
  while time.time() - start_time < time_limit:
70
- # Create a unique identifier for each form
71
- form_id = 0
72
- with st.form(key='new_word_{form_id}'):
73
- form_id=form_id + 1
74
  new_word = st.text_input("Enter a new word:")
75
  if len(new_word) >= 3 and new_word not in words and validate_word(new_word.upper(), board):
76
  words.add(new_word)
77
  st.write(f"Added {new_word} to the list of words!")
78
  st.form_submit_button(label='Submit')
 
79
  st.write("Time's up! Here are your words:")
80
  st.write(words)
81
 
 
65
  st.write(board_df)
66
  words = set()
67
  start_time = time.time()
68
+ form_id = 0
69
 
70
  while time.time() - start_time < time_limit:
71
+ with st.form(key=f"new_word_{form_id}"):
 
 
 
72
  new_word = st.text_input("Enter a new word:")
73
  if len(new_word) >= 3 and new_word not in words and validate_word(new_word.upper(), board):
74
  words.add(new_word)
75
  st.write(f"Added {new_word} to the list of words!")
76
  st.form_submit_button(label='Submit')
77
+ form_id += 1
78
  st.write("Time's up! Here are your words:")
79
  st.write(words)
80