Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,13 +25,13 @@ def find_most_similar_command(statement, command_list):
|
|
| 25 |
best_match = None
|
| 26 |
highest_similarity = 0
|
| 27 |
for index,file_list in command_list.items():
|
| 28 |
-
for
|
| 29 |
similarity = SequenceMatcher(None, statement, command).ratio()
|
| 30 |
print(i,"similarity",similarity)
|
| 31 |
if similarity > highest_similarity:
|
| 32 |
highest_similarity = similarity
|
| 33 |
best_match = command
|
| 34 |
-
reply=
|
| 35 |
|
| 36 |
return best_match,reply
|
| 37 |
|
|
|
|
| 25 |
best_match = None
|
| 26 |
highest_similarity = 0
|
| 27 |
for index,file_list in command_list.items():
|
| 28 |
+
for command in file_list:
|
| 29 |
similarity = SequenceMatcher(None, statement, command).ratio()
|
| 30 |
print(i,"similarity",similarity)
|
| 31 |
if similarity > highest_similarity:
|
| 32 |
highest_similarity = similarity
|
| 33 |
best_match = command
|
| 34 |
+
reply=index
|
| 35 |
|
| 36 |
return best_match,reply
|
| 37 |
|