Thanh Vinh Vo commited on
Commit
72e5b67
·
1 Parent(s): d6e8476
Files changed (1) hide show
  1. app.py +5 -25
app.py CHANGED
@@ -218,12 +218,10 @@ class BasicAgent:
218
  "PIL",
219
  "chess",
220
  "img2text",
221
- "chess.pgn",
222
  "PIL.Image",
223
  "bytes",
224
  "cv2",
225
  "numpy",
226
- "chess.engine",
227
  "json",
228
  "whisper",
229
  "openpyxl",
@@ -235,11 +233,10 @@ class BasicAgent:
235
  - Writing code to solve problem.
236
  - Browse and search the web to find information.
237
  - Solving chess problems.
238
- - Parsing Wikipedia pages.
239
  This agent follows rules below:
240
- 1. Take the question literally! Do not add any additional information or assumptions.
241
- 2. `wikipedia` Python library is provided that makes it easy to to interact with Wikipedia pages.
242
- 3. `pandas` Python package is provided that makes it easy to extract table data from Wikipedia HTML pages.
243
  """,
244
  verbosity_level=0,
245
  max_steps=10,
@@ -255,28 +252,12 @@ class BasicAgent:
255
  self.multimodal_agent,
256
  self.code_agent],
257
  additional_authorized_imports=[
258
- "requests",
259
- "bs4",
260
  "markdownify",
261
  "wikipedia",
262
- "pandas",
263
- "io",
264
- "PIL",
265
- "chess",
266
- "img2text",
267
- "chess.pgn",
268
- "PIL.Image",
269
- "bytes",
270
- "cv2",
271
- "numpy",
272
- "chess.engine",
273
- "json",
274
- "whisper",
275
- "youtube_transcript_api",
276
- "openpyxl",
277
  ],
278
  planning_interval=5,
279
- max_steps=15,
280
  )
281
 
282
  def __call__(self, question: str, question_id: str, file_name: str) -> str:
@@ -287,7 +268,6 @@ class BasicAgent:
287
  "{question}""{file}"
288
  Please follow rules below:
289
  1. Take the question literally! Do not add any additional information or assumptions.
290
- 2. `pandas` Python package is provided that makes it easy to extract table data from Wikipedia HTML pages.
291
  """
292
  result = self.manager_agent.run(prompt)
293
  print(f"Agent responded with: {result}")
 
218
  "PIL",
219
  "chess",
220
  "img2text",
 
221
  "PIL.Image",
222
  "bytes",
223
  "cv2",
224
  "numpy",
 
225
  "json",
226
  "whisper",
227
  "openpyxl",
 
233
  - Writing code to solve problem.
234
  - Browse and search the web to find information.
235
  - Solving chess problems.
236
+ - Parsing and extracting data from Wikipedia pages.
237
  This agent follows rules below:
238
+ 1. `wikipedia` Python library is provided, we should use it to interact with Wikipedia pages.
239
+ 2. `pandas` Python package is provided, we should use it to extract table data from Wikipedia HTML pages.
 
240
  """,
241
  verbosity_level=0,
242
  max_steps=10,
 
252
  self.multimodal_agent,
253
  self.code_agent],
254
  additional_authorized_imports=[
 
 
255
  "markdownify",
256
  "wikipedia",
257
+ "pandas"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  ],
259
  planning_interval=5,
260
+ max_steps=10,
261
  )
262
 
263
  def __call__(self, question: str, question_id: str, file_name: str) -> str:
 
268
  "{question}""{file}"
269
  Please follow rules below:
270
  1. Take the question literally! Do not add any additional information or assumptions.
 
271
  """
272
  result = self.manager_agent.run(prompt)
273
  print(f"Agent responded with: {result}")