Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
aaryaman
/
qa-encoding
like
0
Runtime error
App
Files
Files
Community
aaryaman
commited on
Nov 30, 2022
Commit
d8592f0
•
1 Parent(s):
49c8703
Create app.py
Browse files
Files changed (1)
hide
show
app.py
+7
-0
app.py
ADDED
Viewed
@@ -0,0 +1,7 @@
1
+
from sentence_transformers import SentenceTransformer, util
2
+
3
+
#Load the model
4
+
model = SentenceTransformer('sentence-transformers/multi-qa-mpnet-base-dot-v1')
5
+
6
+
def encoder(query):
7
+
model.encode(query)