Spaces:
Runtime error
Runtime error
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() |