rahulnamdev commited on
Commit
c3e8da8
·
verified ·
1 Parent(s): ef157fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,6 +3,7 @@ from smolagents import HfApiModel
3
  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", split="train", token=os.getenv('Testing'))
8
 
@@ -24,7 +25,8 @@ def get_price_tool(arg1:str)-> float: #it's import to specify the return type
24
  #Agent Example
25
  model = HfApiModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct", token=os.getenv('Testing'))
26
  agent = CodeAgent(tools=[get_price_tool], model=model)
27
- agent.run("Can you dispay prices of all Electronics products in a table")
 
28
 
29
  # Access HF Hub
30
  #from huggingface_hub import list_models
 
3
  from smolagents import tool
4
  #from smolagents import DuckDuckGoSearchTool
5
  import os
6
+ from Gradio_UI import GradioUI
7
  from datasets import load_dataset
8
  dataset = load_dataset("bprateek/amazon_product_description", revision="main", split="train", token=os.getenv('Testing'))
9
 
 
25
  #Agent Example
26
  model = HfApiModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct", token=os.getenv('Testing'))
27
  agent = CodeAgent(tools=[get_price_tool], model=model)
28
+ #agent.run("Can you dispay prices of all Electronics products in a table")
29
+ GradioUI(agent).launch()
30
 
31
  # Access HF Hub
32
  #from huggingface_hub import list_models