Spaces:
Sleeping
Sleeping
concatentation
Browse files
app.py
CHANGED
|
@@ -20,12 +20,10 @@ client = InferenceClient("Qwen/Qwen2.5-72B-Instruct")
|
|
| 20 |
def respond(message, history, cuisine, dietary_restrictions, allergies, preferred_ingredient):
|
| 21 |
response = ""
|
| 22 |
top_chunks = get_top_chunks(message)
|
| 23 |
-
top_chunks
|
| 24 |
-
top_chunks
|
| 25 |
-
top_chunks
|
| 26 |
-
top_chunks
|
| 27 |
-
context = "\n".join(top_chunks)
|
| 28 |
-
print (top_chunks)
|
| 29 |
messages = [
|
| 30 |
{
|
| 31 |
"role": "system",
|
|
|
|
| 20 |
def respond(message, history, cuisine, dietary_restrictions, allergies, preferred_ingredient):
|
| 21 |
response = ""
|
| 22 |
top_chunks = get_top_chunks(message)
|
| 23 |
+
top_chunks += get_top_chunks(cuisine)
|
| 24 |
+
top_chunks += get_top_chunks(str(dietary_restrictions)) # convert list to str
|
| 25 |
+
top_chunks += get_top_chunks(allergies)
|
| 26 |
+
top_chunks += get_top_chunks(preferred_ingredient)
|
|
|
|
|
|
|
| 27 |
messages = [
|
| 28 |
{
|
| 29 |
"role": "system",
|