Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,10 @@ for q in queries:
|
|
| 58 |
|
| 59 |
def respond(message, history):
|
| 60 |
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
if history:
|
| 64 |
messages.extend(history)
|
|
@@ -78,7 +81,4 @@ def yes_or_no(message, history):
|
|
| 78 |
chatbot = gr.ChatInterface(respond, type = "messages")
|
| 79 |
# defining my chatbot so that the user can interact and see their conversation history and send new messages
|
| 80 |
|
| 81 |
-
top_results = get_top_chunks(question, chunk_embeddings, cleaned_chunks)
|
| 82 |
-
print(top_results)
|
| 83 |
-
|
| 84 |
chatbot.launch()
|
|
|
|
| 58 |
|
| 59 |
def respond(message, history):
|
| 60 |
|
| 61 |
+
top_results = get_top_chunks(question, chunk_embeddings, cleaned_chunks)
|
| 62 |
+
print(top_results)
|
| 63 |
+
|
| 64 |
+
messages = [{"role": "system", "content": "You are a friendly chatbot. You give people advice about skincare. Base your response on the following information {top_results}"}]
|
| 65 |
|
| 66 |
if history:
|
| 67 |
messages.extend(history)
|
|
|
|
| 81 |
chatbot = gr.ChatInterface(respond, type = "messages")
|
| 82 |
# defining my chatbot so that the user can interact and see their conversation history and send new messages
|
| 83 |
|
|
|
|
|
|
|
|
|
|
| 84 |
chatbot.launch()
|