Ishanpardeshi commited on
Commit
2a2de58
1 Parent(s): 7759639

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -91,13 +91,13 @@ class tools:
91
  class AgentLoader:
92
 
93
  def csvReaderAgent(path):
94
- # agent = create_csv_agent(
95
- # ChatGoogleGenerativeAI(temperature=0.6, model="gemini-1.5-flash-latest"),
96
- # path,
97
- # verbose=True,
98
- # agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION
99
- # )
100
- return 0
101
 
102
  def fileReaderAgent(path):
103
  FileReader = Agent(
@@ -182,7 +182,7 @@ def process_file(file, query, expected_output):
182
  agent = AgentLoader.fileReaderAgent(path)
183
  elif path.endswith(".csv"):
184
  agent = AgentLoader.csvReaderAgent(path)
185
- results = "agent.run(query)"
186
  else:
187
  return 'File NOT supported'
188
 
 
91
  class AgentLoader:
92
 
93
  def csvReaderAgent(path):
94
+ agent = create_csv_agent(
95
+ llm,
96
+ path,
97
+ verbose=True,
98
+ agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION
99
+ )
100
+ return agent
101
 
102
  def fileReaderAgent(path):
103
  FileReader = Agent(
 
182
  agent = AgentLoader.fileReaderAgent(path)
183
  elif path.endswith(".csv"):
184
  agent = AgentLoader.csvReaderAgent(path)
185
+ results = agent.run(query)
186
  else:
187
  return 'File NOT supported'
188