Update app.py
Browse files
app.py
CHANGED
@@ -37,11 +37,12 @@ def generate_words(letters, length=None):
|
|
37 |
permutations = set()
|
38 |
for i in range(1, len(letters) + 1):
|
39 |
for p in itertools.permutations(letters, i):
|
40 |
-
word = "".join(p)
|
41 |
if (length is None or len(word) == length) and word in english_words:
|
42 |
permutations.add(word)
|
43 |
return permutations
|
44 |
|
|
|
45 |
st.title("Scrabble Helper")
|
46 |
|
47 |
letters = st.text_input("Enter the letters you have:")
|
|
|
37 |
permutations = set()
|
38 |
for i in range(1, len(letters) + 1):
|
39 |
for p in itertools.permutations(letters, i):
|
40 |
+
word = "".join(p).lower() # Convert the word to lowercase
|
41 |
if (length is None or len(word) == length) and word in english_words:
|
42 |
permutations.add(word)
|
43 |
return permutations
|
44 |
|
45 |
+
|
46 |
st.title("Scrabble Helper")
|
47 |
|
48 |
letters = st.text_input("Enter the letters you have:")
|