Spaces:
Runtime error
Runtime error
import gradio as gr | |
from sentence_transformers import SentenceTransformer | |
model = SentenceTransformer('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2') | |
def encode_sentences(sentences): | |
embeddings = model.encode(sentences) | |
return embeddings | |
demo = gr.Interface(fn=encode_sentences, | |
inputs="textbox", | |
outputs="text") | |
if __name__ == "__main__": | |
demo.launch() |