AyoubChLin commited on
Commit
53ee911
1 Parent(s): b039640

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import streamlit as st
2
- from sentence_transformers import SentenceTransformer
3
 
4
  # Load the model
5
  model = SentenceTransformer('sentence-transformers/msmarco-distilbert-dot-v5')
@@ -24,8 +24,7 @@ def main():
24
 
25
  # Function to get the embedding
26
  def get_emb(text):
27
- text_emb = model.encode(text)
28
- return text_emb
29
 
30
  # Run the Streamlit app
31
  if __name__ == "__main__":
 
1
  import streamlit as st
2
+ from sentence_transformers import SentenceTransformer, util
3
 
4
  # Load the model
5
  model = SentenceTransformer('sentence-transformers/msmarco-distilbert-dot-v5')
 
24
 
25
  # Function to get the embedding
26
  def get_emb(text):
27
+ return model.encode(text)
 
28
 
29
  # Run the Streamlit app
30
  if __name__ == "__main__":