apitest1 / app.py
GoldDany's picture
Update app.py
0d1c353 verified
raw
history blame contribute delete
306 Bytes
import gradio as gr
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("all-mpnet-base-v2")
def get_embeddings(text):
return model.encode(text).tolist()
gr.Interface(
fn=get_embeddings,
inputs="text",
outputs="json",
title="DiDef Embeddings"
).launch()