Surajrgl's picture
Update app.py
1d8387c
raw
history blame
323 Bytes
from sentence_transformers import SentenceTransformer
import gradio as gr
model = SentenceTransformer('sentence-transformers/multi-qa-mpnet-base-cos-v1')
def generate_embedding(query):
return model.encode(query)
demo = gr.Interface(fn=generate_embedding, inputs="text", outputs="text")
demo.launch( show_api=True)