keithhon's picture
Update app.py
1a09c2b
raw
history blame contribute delete
310 Bytes
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()