Spaces:
Sleeping
Sleeping
updated role
Browse files
app.py
CHANGED
|
@@ -92,7 +92,7 @@ def get_top_chunks(query, chunk_embeddings, text_chunks):
|
|
| 92 |
# SEMANTIC SEARCH STEP 6
|
| 93 |
|
| 94 |
# Call the get_top_chunks function with the original query
|
| 95 |
-
top_results = get_top_chunks('
|
| 96 |
|
| 97 |
print(top_results)# Print the top results
|
| 98 |
|
|
@@ -103,7 +103,7 @@ client = InferenceClient("microsoft/phi-4")
|
|
| 103 |
def respond(message,history):
|
| 104 |
|
| 105 |
info = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
|
| 106 |
-
messages = [{'role': 'system','content':f'You are a friendly chatbot using {info} to answer questions.'}]
|
| 107 |
#use string interporlation with variable info
|
| 108 |
|
| 109 |
if history:
|
|
|
|
| 92 |
# SEMANTIC SEARCH STEP 6
|
| 93 |
|
| 94 |
# Call the get_top_chunks function with the original query
|
| 95 |
+
top_results = get_top_chunks('What causes skin cancer?',chunk_embeddings, cleaned_chunks) # Complete this line
|
| 96 |
|
| 97 |
print(top_results)# Print the top results
|
| 98 |
|
|
|
|
| 103 |
def respond(message,history):
|
| 104 |
|
| 105 |
info = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
|
| 106 |
+
messages = [{'role': 'system','content':f'You are a friendly chatbot using {info} to answer questions. You are always willing to help and want the best for the user. You need to emphasize that you are not a medical professional, but you are here to help to the best of your ability.'}]
|
| 107 |
#use string interporlation with variable info
|
| 108 |
|
| 109 |
if history:
|