Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,16 +13,12 @@ def get_price_tool(arg1:str)-> float: #it's import to specify the return type
|
|
| 13 |
"""This is a tool which look on a dataset and filter for products and their various atteibutes like prices description
|
| 14 |
Args:
|
| 15 |
arg1: the category of product
|
| 16 |
-
"""
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
responses = dataset[dataset['Product Name'].str.contains(arg1)]
|
| 21 |
-
print(responses)
|
| 22 |
#filter_dataset_min = filter_dataset['Selling Price'].min()
|
| 23 |
#filter_dataset_max = filter_dataset['Selling Price'].min()
|
| 24 |
return responses
|
| 25 |
-
#return (filter_dataset_min + filter_dataset_max )/2
|
| 26 |
|
| 27 |
|
| 28 |
#Agent Example
|
|
|
|
| 13 |
"""This is a tool which look on a dataset and filter for products and their various atteibutes like prices description
|
| 14 |
Args:
|
| 15 |
arg1: the category of product
|
| 16 |
+
"""
|
| 17 |
+
arg1 = arg1.lower()
|
| 18 |
+
responses = dataset.filter(lambda example: arg1 in example['Product Name'].lower())
|
|
|
|
|
|
|
|
|
|
| 19 |
#filter_dataset_min = filter_dataset['Selling Price'].min()
|
| 20 |
#filter_dataset_max = filter_dataset['Selling Price'].min()
|
| 21 |
return responses
|
|
|
|
| 22 |
|
| 23 |
|
| 24 |
#Agent Example
|