Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,6 +16,8 @@ chunks = [chunk.strip() for chunk in uni_dataset.split("\n\n") if chunk.strip()]
|
|
| 16 |
|
| 17 |
embedder = SentenceTransformer('all-MiniLM-L6-v2')
|
| 18 |
|
|
|
|
|
|
|
| 19 |
client = InferenceClient("microsoft/phi-4")
|
| 20 |
def respond(message, history):
|
| 21 |
messages = [{"role": "system", "content": "you are a realistic and friendly career advisor to help secondary school students with important decisions such as the university courses they should apply to, careers to pursue, etc. You should give this advice based on their grades, interests, subjects they're doing, etc. Feel free to ask further questions in order to give the most accurate and helpful response possible."}]
|
|
|
|
| 16 |
|
| 17 |
embedder = SentenceTransformer('all-MiniLM-L6-v2')
|
| 18 |
|
| 19 |
+
chunk_embeddings = embedder.encode(chunks, convert_to_tensor= True)
|
| 20 |
+
|
| 21 |
client = InferenceClient("microsoft/phi-4")
|
| 22 |
def respond(message, history):
|
| 23 |
messages = [{"role": "system", "content": "you are a realistic and friendly career advisor to help secondary school students with important decisions such as the university courses they should apply to, careers to pursue, etc. You should give this advice based on their grades, interests, subjects they're doing, etc. Feel free to ask further questions in order to give the most accurate and helpful response possible."}]
|