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