Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -68,13 +68,13 @@ with mod_container:
|
|
68 |
simscore = PathFinder.predict([prompt])
|
69 |
|
70 |
from sentence_transformers import CrossEncoder
|
71 |
-
|
72 |
sentence_pairs = []
|
73 |
for sentence1, sentence2 in zip(data['sentence1'], data['sentence2']):
|
74 |
sentence_pairs.append([sentence1, sentence2])
|
75 |
|
76 |
# sorting the df to get highest scoring xpath_container
|
77 |
-
data['SBERT CrossEncoder_Score'] =
|
78 |
most_acc = data.head(5)
|
79 |
# predictions
|
80 |
st.write("Highest Similarity score: ", simscore)
|
|
|
68 |
simscore = PathFinder.predict([prompt])
|
69 |
|
70 |
from sentence_transformers import CrossEncoder
|
71 |
+
loaded_model = CrossEncoder("cross-encoder/stsb-roberta-base")
|
72 |
sentence_pairs = []
|
73 |
for sentence1, sentence2 in zip(data['sentence1'], data['sentence2']):
|
74 |
sentence_pairs.append([sentence1, sentence2])
|
75 |
|
76 |
# sorting the df to get highest scoring xpath_container
|
77 |
+
data['SBERT CrossEncoder_Score'] = loaded_model.predict(sentence_pairs)
|
78 |
most_acc = data.head(5)
|
79 |
# predictions
|
80 |
st.write("Highest Similarity score: ", simscore)
|