schlenker commited on
Commit
ddc6bd6
·
1 Parent(s): a0c7209

Minor bug fix

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -49,13 +49,13 @@ def remove_punctuation(word):
49
 
50
  def return_top_k(sentence, k=10, word=None, rels=False):
51
 
52
- #if sentence[-1] != ".":
53
- # sentence = sentence + "."
54
 
55
  if rels:
56
  inputs = [f"Description : It is related to '{word}' but not '{word}'. Word : "]
57
  else:
58
- inputs = [f"Description : {sentence}. Word : "]
59
 
60
  inputs = tokenizer(
61
  inputs,
 
49
 
50
  def return_top_k(sentence, k=10, word=None, rels=False):
51
 
52
+ if sentence[-1] != ".":
53
+ sentence = sentence + "."
54
 
55
  if rels:
56
  inputs = [f"Description : It is related to '{word}' but not '{word}'. Word : "]
57
  else:
58
+ inputs = [f"Description : {sentence} Word : "]
59
 
60
  inputs = tokenizer(
61
  inputs,