Update app.py
Browse files
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)
|