spuun commited on
Commit
3273130
1 Parent(s): d325382

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ model = SentenceTransformer(
9
  def launch(source_sentence, sentences):
10
  source = model.encode(source_sentence, convert_to_tensor=True)
11
  references = model.encode([e.strip() for e in sentences.split("|")], convert_to_tensor=True)
12
- return ",".join(util.pytorch_cos_sim(source, references).flatten().tolist())
13
 
14
  iface = gr.Interface(launch, inputs=["text","text"], outputs="text")
15
  iface.launch()
 
9
  def launch(source_sentence, sentences):
10
  source = model.encode(source_sentence, convert_to_tensor=True)
11
  references = model.encode([e.strip() for e in sentences.split("|")], convert_to_tensor=True)
12
+ return ",".join([str(e) for e in util.pytorch_cos_sim(source, references).flatten().tolist()])
13
 
14
  iface = gr.Interface(launch, inputs=["text","text"], outputs="text")
15
  iface.launch()