stogaja commited on
Commit
b6b6380
1 Parent(s): a84dcc7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -68,13 +68,13 @@ with mod_container:
68
  simscore = PathFinder.predict([prompt])
69
 
70
  from sentence_transformers import CrossEncoder
71
- XpathFinder = 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'] = XpathFinder.predict(sentence_pairs)
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)