File size: 310 Bytes
0f9899c
42bfc04
8f81112
0f9899c
42bfc04
1a09c2b
0f9899c
bb81e2b
0f9899c
1
2
3
4
5
6
7
8
9
import gradio as gr
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('keithhon/paraphrase-multilingual-MiniLM-L12-v2')

def compute_embedding(name):
    return model.encode(name).tolist()

iface = gr.Interface(fn=compute_embedding, inputs="text", outputs="text")
iface.launch()