Spaces:
Runtime error
Runtime error
Update app.py
#3
by
ierhon
- opened
app.py
CHANGED
@@ -3,7 +3,7 @@ import difflib,time,numpy
|
|
3 |
# Dictionary
|
4 |
dictionaryFile=open('words.txt','r') # Open words file
|
5 |
dictionary=dictionaryFile.readlines() # Read words file into list
|
6 |
-
|
7 |
|
8 |
def check3(inp, inp2):
|
9 |
if len(inp) > len(inp2):
|
@@ -51,7 +51,7 @@ def get_matches(text):
|
|
51 |
try:
|
52 |
##return(difflib.get_close_matches(text, dictionary)) #[0].replace("\n", "")
|
53 |
for x in range(queue):
|
54 |
-
output.append(difflib.get_close_matches(textR, dictionary))
|
55 |
return(output)
|
56 |
except Exception as ex: # Print error if error
|
57 |
return(ex)
|
|
|
3 |
# Dictionary
|
4 |
dictionaryFile=open('words.txt','r') # Open words file
|
5 |
dictionary=dictionaryFile.readlines() # Read words file into list
|
6 |
+
dictionaryFile.close()
|
7 |
|
8 |
def check3(inp, inp2):
|
9 |
if len(inp) > len(inp2):
|
|
|
51 |
try:
|
52 |
##return(difflib.get_close_matches(text, dictionary)) #[0].replace("\n", "")
|
53 |
for x in range(queue):
|
54 |
+
output.append(difflib.get_close_matches(textR[x], dictionary))
|
55 |
return(output)
|
56 |
except Exception as ex: # Print error if error
|
57 |
return(ex)
|