Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -54,14 +54,15 @@ def predict(system_msg, inputs, top_p, temperature, chat_counter, chatbot=[], hi
|
|
54 |
input_words.append(str(input).lower())
|
55 |
|
56 |
for product_info in products:
|
57 |
-
|
58 |
if product_info[0] in input_words:
|
59 |
new_msg = f"{product_info[2]} {product_info[1][0]} ve fiyatı EURO {product_info[1][1]}"
|
60 |
print(new_msg)
|
|
|
61 |
product_msg = {"role": "system", "content": new_msg}
|
62 |
messages.append(product_msg)
|
63 |
|
64 |
-
outofstock_msg = f"Bir önceki listeden başka {product_info
|
65 |
noneproduct_msg = {"role": "system", "content": outofstock_msg}
|
66 |
messages.append(noneproduct_msg)
|
67 |
|
|
|
54 |
input_words.append(str(input).lower())
|
55 |
|
56 |
for product_info in products:
|
57 |
+
|
58 |
if product_info[0] in input_words:
|
59 |
new_msg = f"{product_info[2]} {product_info[1][0]} ve fiyatı EURO {product_info[1][1]}"
|
60 |
print(new_msg)
|
61 |
+
|
62 |
product_msg = {"role": "system", "content": new_msg}
|
63 |
messages.append(product_msg)
|
64 |
|
65 |
+
outofstock_msg = f"Bir önceki listeden başka {product_info} stoklarda bulunmamaktadır"
|
66 |
noneproduct_msg = {"role": "system", "content": outofstock_msg}
|
67 |
messages.append(noneproduct_msg)
|
68 |
|