Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,9 @@ def predict_price_tool(arg1:str)-> float: #it's import to specify the return typ
|
|
14 |
Args:
|
15 |
arg1: the category of product
|
16 |
"""
|
17 |
-
filter_dataset = set(dataset['train']['Category'])
|
18 |
-
|
|
|
19 |
#filter_dataset_min = filter_dataset['Selling Price'].min()
|
20 |
#filter_dataset_max = filter_dataset['Selling Price'].min()
|
21 |
return 1
|
@@ -25,7 +26,7 @@ def predict_price_tool(arg1:str)-> float: #it's import to specify the return typ
|
|
25 |
#Agent Example
|
26 |
model = HfApiModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct", token=os.getenv('Testing'))
|
27 |
agent = CodeAgent(tools=[predict_price_tool], model=model)
|
28 |
-
agent.run("
|
29 |
|
30 |
# Access HF Hub
|
31 |
#from huggingface_hub import list_models
|
|
|
14 |
Args:
|
15 |
arg1: the category of product
|
16 |
"""
|
17 |
+
#filter_dataset = set(dataset['train']['Category'])
|
18 |
+
responses = dataset[dataset['Product Name'].str.contains(arg1)]
|
19 |
+
print(responses)
|
20 |
#filter_dataset_min = filter_dataset['Selling Price'].min()
|
21 |
#filter_dataset_max = filter_dataset['Selling Price'].min()
|
22 |
return 1
|
|
|
26 |
#Agent Example
|
27 |
model = HfApiModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct", token=os.getenv('Testing'))
|
28 |
agent = CodeAgent(tools=[predict_price_tool], model=model)
|
29 |
+
agent.run("Electronics")
|
30 |
|
31 |
# Access HF Hub
|
32 |
#from huggingface_hub import list_models
|