Hunzla commited on
Commit
b2f9adc
1 Parent(s): 6049ddf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -21,14 +21,15 @@ def find_most_similar_command(statement, command_list):
21
  best_match = None
22
  highest_similarity = 0
23
  i=0
24
- for command in command_list:
 
25
  similarity = SequenceMatcher(None, statement, command).ratio()
26
- print(similarity)
27
  if similarity > highest_similarity:
28
  highest_similarity = similarity
29
  best_match = command
30
  reply=i
31
- i+=1
32
 
33
  return best_match,reply
34
  def transcribe_the_command(audio,id):
 
21
  best_match = None
22
  highest_similarity = 0
23
  i=0
24
+ for sub_list in command_list:
25
+ for command in sub_list:
26
  similarity = SequenceMatcher(None, statement, command).ratio()
27
+ print(i,"similarity",similarity)
28
  if similarity > highest_similarity:
29
  highest_similarity = similarity
30
  best_match = command
31
  reply=i
32
+ i+=1
33
 
34
  return best_match,reply
35
  def transcribe_the_command(audio,id):