AhmedSSabir
commited on
Commit
•
5ac0349
1
Parent(s):
4e75e3a
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,12 @@ from sentence_transformers import SentenceTransformer, util
|
|
13 |
from sklearn.metrics.pairwise import cosine_similarity
|
14 |
|
15 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
16 |
-
model =
|
|
|
|
|
|
|
|
|
|
|
17 |
batch_size = 1
|
18 |
scorer = LMScorer.from_pretrained('gpt2' , device=device, batch_size=batch_size)
|
19 |
|
|
|
13 |
from sklearn.metrics.pairwise import cosine_similarity
|
14 |
|
15 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
16 |
+
model = gr.interface.huggingface.load('stsb-distilbert-base')
|
17 |
+
|
18 |
+
#SentenceTransformer('stsb-distilbert-base', device=device)
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
batch_size = 1
|
23 |
scorer = LMScorer.from_pretrained('gpt2' , device=device, batch_size=batch_size)
|
24 |
|