dipankartnt commited on
Commit
8a63a7e
1 Parent(s): 0eab9ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -3,5 +3,6 @@ from sentence_transformers import SentenceTransformer
3
  sentences = st.text_area('Enter some text')
4
 
5
  model = SentenceTransformer('sentence-transformers/all-MiniLM-L12-v1')
6
- embeddings = model.encode(sentences)
7
- st.json(embeddings)
 
 
3
  sentences = st.text_area('Enter some text')
4
 
5
  model = SentenceTransformer('sentence-transformers/all-MiniLM-L12-v1')
6
+ if sentences:
7
+ embeddings = model.encode(sentences)
8
+ st.json(embeddings)