matterattetatte commited on
Commit
1195f6d
·
verified ·
1 Parent(s): 6412796

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -16
app.py CHANGED
@@ -71,21 +71,8 @@ def sql_engine(query: str) -> str:
71
 
72
  sql_agent = CodeAgent(
73
  tools=[sql_engine],
74
- model=HfApiModel("meta-llama/Meta-Llama-3.1-8B-Instruct"),
75
- )
76
-
77
- managed_sql_agent = ManagedAgent(
78
- agent=sql_agent,
79
- name="sql search",
80
- description="Runs SQL queries. Give it your query as an argument. Also, this agent should provide the actual query it ran.",
81
- )
82
-
83
- manager_agent = CodeAgent(
84
- tools=[],
85
- model=HfApiModel(model_id = "Qwen/Qwen2.5-Coder-32B-Instruct"),
86
- managed_agents=[managed_sql_agent],
87
- additional_authorized_imports=['pyparsing', 'matplotlib', 'datetime', 'statistics', 'bs4', 'request', 'unicodedata', 'queue', 'time', 'collections', 're', 'math', 'stat', 'random',
88
- 'itertools'],
89
  )
90
 
91
  # Function to log agent actions
@@ -97,7 +84,7 @@ def log_agent_action(prompt, result, agent_name):
97
  st.code(result, language="text")
98
 
99
  # Streamlit app title
100
- st.title("AI SQL Assistant Agent researching your query and summarizing it")
101
 
102
  # App description
103
  st.write("Generate SQL queries using human speech powered by SmolAgents.")
 
71
 
72
  sql_agent = CodeAgent(
73
  tools=[sql_engine],
74
+ model=HfApiModel(),
75
+ # additional_authorized_imports=['pyparsing', 'matplotlib', 'datetime', 'statistics', 'bs4', 'request', 'unicodedata', 'queue', 'time', 'collections', 're', 'math', 'stat', 'random', 'itertools'],
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  )
77
 
78
  # Function to log agent actions
 
84
  st.code(result, language="text")
85
 
86
  # Streamlit app title
87
+ st.title("AI SQL Agent researching your query and summarizing it")
88
 
89
  # App description
90
  st.write("Generate SQL queries using human speech powered by SmolAgents.")