Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from smolagents import tool
|
|
4 |
#from smolagents import DuckDuckGoSearchTool
|
5 |
import os
|
6 |
from datasets import load_dataset
|
7 |
-
dataset = load_dataset("bprateek/amazon_product_description", revision="main", token=os.getenv('Testing'))
|
8 |
|
9 |
|
10 |
@tool
|
@@ -16,7 +16,7 @@ def get_price_tool(arg1:str)-> float: #it's import to specify the return type
|
|
16 |
"""
|
17 |
#filter_dataset = set(dataset['train']['Category'])
|
18 |
print(arg1)
|
19 |
-
responses = dataset[dataset['
|
20 |
print(responses)
|
21 |
#filter_dataset_min = filter_dataset['Selling Price'].min()
|
22 |
#filter_dataset_max = filter_dataset['Selling Price'].min()
|
|
|
4 |
#from smolagents import DuckDuckGoSearchTool
|
5 |
import os
|
6 |
from datasets import load_dataset
|
7 |
+
dataset = load_dataset("bprateek/amazon_product_description", revision="main", split="train," token=os.getenv('Testing'))
|
8 |
|
9 |
|
10 |
@tool
|
|
|
16 |
"""
|
17 |
#filter_dataset = set(dataset['train']['Category'])
|
18 |
print(arg1)
|
19 |
+
responses = dataset[dataset['Product Name'].str.contains(arg1)]
|
20 |
print(responses)
|
21 |
#filter_dataset_min = filter_dataset['Selling Price'].min()
|
22 |
#filter_dataset_max = filter_dataset['Selling Price'].min()
|