Spaces:
Runtime error
Runtime error
File size: 307 Bytes
0bdf24f d8592f0 bf0302d 0bdf24f 2932acb 0bdf24f |
1 2 3 4 5 6 7 8 9 10 11 12 |
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() |