Hunzla commited on
Commit
f029a76
1 Parent(s): fe27f73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -24,14 +24,15 @@ with open("tasks.json", "r",encoding="utf-8") as json_file:
24
  def find_most_similar_command(statement, command_list):
25
  best_match = None
26
  highest_similarity = 0
27
- for index,sub_list in command_list:
28
- for command in sub_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
 
 
24
  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 key,value in file_list.items():
29
+ for command in value:
30
  similarity = SequenceMatcher(None, statement, command).ratio()
31
  print(i,"similarity",similarity)
32
  if similarity > highest_similarity:
33
  highest_similarity = similarity
34
  best_match = command
35
+ reply=key
36
 
37
  return best_match,reply
38