qa-encoding / app.py
aaryaman's picture
Update app.py
2932acb
raw
history blame contribute delete
307 Bytes
import gradio as gr
from sentence_transformers import SentenceTransformer, util
#Load the model
model = SentenceTransformer('sentence-transformers/multi-qa-mpnet-base-dot-v1')
def encoder(query):
return model.encode(query)
demo = gr.Interface(fn=encoder, inputs="text", outputs="text")
demo.launch()