Hunzla commited on
Commit
391f586
1 Parent(s): c93bccd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -24,20 +24,16 @@ 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
- i = 0 # Replace this with your value of i
28
-
29
  # Using globals() to create a global variable
30
  for index,file_list in command_list.items():
31
- i = 0
32
  for command in file_list:
33
  similarity = SequenceMatcher(None, statement, command).ratio()
34
- i= i+similarity
35
  print(index,"similarity",similarity)
36
  if similarity > highest_similarity:
37
  highest_similarity = similarity
38
  best_match = command
39
  reply=index
40
- print(i)
41
  return best_match,reply
42
 
43
  def transcribe_the_command(audio,menu_id,abc):
 
24
  def find_most_similar_command(statement, command_list):
25
  best_match = None
26
  highest_similarity = 0
27
+ reply=404
 
28
  # Using globals() to create a global variable
29
  for index,file_list in command_list.items():
 
30
  for command in file_list:
31
  similarity = SequenceMatcher(None, statement, command).ratio()
 
32
  print(index,"similarity",similarity)
33
  if similarity > highest_similarity:
34
  highest_similarity = similarity
35
  best_match = command
36
  reply=index
 
37
  return best_match,reply
38
 
39
  def transcribe_the_command(audio,menu_id,abc):