demo-app / app.py
dipankartnt's picture
Update app.py
8a63a7e
raw
history blame contribute delete
267 Bytes
import streamlit as st
from sentence_transformers import SentenceTransformer
sentences = st.text_area('Enter some text')
model = SentenceTransformer('sentence-transformers/all-MiniLM-L12-v1')
if sentences:
embeddings = model.encode(sentences)
st.json(embeddings)