lwant commited on
Commit
0a714d8
Β·
1 Parent(s): d944d48

Refactor import of `SimpleDirectoryReader` in `hf_submission_api` to optimize placement.

Browse files
src/gaia_solving_agent/hf_submission_api.py CHANGED
@@ -3,6 +3,7 @@ from functools import lru_cache
3
 
4
  import pandas as pd
5
  import requests
 
6
  from llama_index.core.agent.workflow import BaseWorkflowAgent
7
  from workflows import Workflow
8
 
@@ -54,7 +55,6 @@ def fetching_questions(api_url: str = DEFAULT_API_URL):
54
  async def run_agent(agent, questions_data):
55
  results_log = []
56
  answers_payload = []
57
- from llama_index.core import SimpleDirectoryReader
58
 
59
  # First, ensure that all complementary files are in the FILE_DIR
60
  for item in questions_data:
 
3
 
4
  import pandas as pd
5
  import requests
6
+ from llama_index.core import SimpleDirectoryReader
7
  from llama_index.core.agent.workflow import BaseWorkflowAgent
8
  from workflows import Workflow
9
 
 
55
  async def run_agent(agent, questions_data):
56
  results_log = []
57
  answers_payload = []
 
58
 
59
  # First, ensure that all complementary files are in the FILE_DIR
60
  for item in questions_data: