Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def find_most_similar_command(statement, command_list):
|
|
| 31 |
globals()[f"sum_{i}"] = 0
|
| 32 |
for command in file_list:
|
| 33 |
similarity = SequenceMatcher(None, statement, command).ratio()
|
| 34 |
-
|
| 35 |
"sum_match_"+str(i)="sum_match_"+str(i)+similarity
|
| 36 |
print("sum_match_"+str(i))
|
| 37 |
print(index,"similarity",similarity)
|
|
@@ -40,7 +40,7 @@ def find_most_similar_command(statement, command_list):
|
|
| 40 |
best_match = command
|
| 41 |
reply=index
|
| 42 |
print(i)
|
| 43 |
-
print(
|
| 44 |
i=i+1
|
| 45 |
return best_match,reply
|
| 46 |
|
|
|
|
| 31 |
globals()[f"sum_{i}"] = 0
|
| 32 |
for command in file_list:
|
| 33 |
similarity = SequenceMatcher(None, statement, command).ratio()
|
| 34 |
+
sum_{i}= sum_{i}+similarity
|
| 35 |
"sum_match_"+str(i)="sum_match_"+str(i)+similarity
|
| 36 |
print("sum_match_"+str(i))
|
| 37 |
print(index,"similarity",similarity)
|
|
|
|
| 40 |
best_match = command
|
| 41 |
reply=index
|
| 42 |
print(i)
|
| 43 |
+
print(sum_{i})
|
| 44 |
i=i+1
|
| 45 |
return best_match,reply
|
| 46 |
|