Spaces:
Runtime error
Runtime error
Commit ·
2824c91
1
Parent(s): f3bf74c
Update app.py (#3)
Browse files- Update app.py (3fe75b8d723ce6669000efb1bd5ac80533b483b8)
Co-authored-by: - - - <ierhon@users.noreply.huggingface.co>
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)
|