Spaces:
Sleeping
Sleeping
Fixed a bug with the output function return_top_k
Browse files
pages/2_Context-based_chatbot.py
CHANGED
@@ -42,7 +42,7 @@ def return_top_k(sentence, word=None, rels=False):
|
|
42 |
# inputs = [f"Description : {sentence} Word : "]
|
43 |
|
44 |
output = model(sentence)
|
45 |
-
output = [output[i]['token_str'] for i in output
|
46 |
return output
|
47 |
|
48 |
|
|
|
42 |
# inputs = [f"Description : {sentence} Word : "]
|
43 |
|
44 |
output = model(sentence)
|
45 |
+
output = [output[i]['token_str'].strip() for i in range(len(output))]
|
46 |
return output
|
47 |
|
48 |
|