aswin-10 commited on
Commit
a018cee
·
verified ·
1 Parent(s): 093e116

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -17,6 +17,7 @@ model = SentenceTransformer('multi-qa-mpnet-base-dot-v1')
17
  df['full_text'] = df.iloc[:, 0] + " " + df.iloc[:, 1] + " " + df['Instructor Name'] + " " + df['Rating'].astype(str) + " " + df['Category']
18
 
19
  # Convert full course texts into embeddings
 
20
  course_embeddings = model.encode(df['full_text'].tolist(), convert_to_tensor=True)
21
 
22
  # Load a model for text generation (e.g., BART)
 
17
  df['full_text'] = df.iloc[:, 0] + " " + df.iloc[:, 1] + " " + df['Instructor Name'] + " " + df['Rating'].astype(str) + " " + df['Category']
18
 
19
  # Convert full course texts into embeddings
20
+ # Precompute and encode course texts into embeddings (this line)
21
  course_embeddings = model.encode(df['full_text'].tolist(), convert_to_tensor=True)
22
 
23
  # Load a model for text generation (e.g., BART)