Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -67,17 +67,30 @@ def boggle(size, time_limit):
|
|
67 |
start_time = time.time()
|
68 |
form_id = 0
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
|
|
79 |
st.write(words)
|
80 |
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
if __name__ == "__main__":
|
83 |
boggle(7, 60)
|
|
|
67 |
start_time = time.time()
|
68 |
form_id = 0
|
69 |
|
70 |
+
with st.form(key=f"new_word_{form_id}"):
|
71 |
+
new_word = st.text_input("Enter a new word:")
|
72 |
+
if len(new_word) >= 3 and new_word not in words and validate_word(new_word.upper(), board):
|
73 |
+
words.add(new_word)
|
74 |
+
st.write(f"Added {new_word} to the list of words!")
|
75 |
+
st.form_submit_button(label='Submit')
|
76 |
+
form_id += 1
|
77 |
+
|
78 |
+
#while time.time() - start_time < time_limit:
|
79 |
+
# st.markdown(""".
|
80 |
+
# """)
|
81 |
+
st.write("Here are your words:")
|
82 |
st.write(words)
|
83 |
|
84 |
+
# while time.time() - start_time < time_limit:
|
85 |
+
# with st.form(key=f"new_word_{form_id}"):
|
86 |
+
# new_word = st.text_input("Enter a new word:")
|
87 |
+
# if len(new_word) >= 3 and new_word not in words and validate_word(new_word.upper(), board):
|
88 |
+
# words.add(new_word)
|
89 |
+
# st.write(f"Added {new_word} to the list of words!")
|
90 |
+
# st.form_submit_button(label='Submit')
|
91 |
+
# form_id += 1
|
92 |
+
#st.write("Time's up! Here are your words:")
|
93 |
+
#st.write(words)
|
94 |
+
|
95 |
if __name__ == "__main__":
|
96 |
boggle(7, 60)
|