Synnove commited on
Commit
044325e
·
verified ·
1 Parent(s): 05a4cd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -11,8 +11,8 @@ from final_answer import FinalAnswerTool
11
  from visit_webpage import VisitWebpageTool
12
  from web_search import web_search_DuckDuckGoSearchTool
13
  from wikipediaLookup import WikipediaLookupTool
14
- from video_translation import AudioTranscriptionTool
15
- from youtube_audio_download import YouTubeAudioDownloadTool
16
 
17
  api_url = "https://agents-course-unit4-scoring.hf.space"
18
  questions_url = f"{api_url}/questions"
@@ -65,16 +65,16 @@ visitWebpage = VisitWebpageTool()
65
  wikipediaLookup = WikipediaLookupTool()
66
  webSearch = web_search_DuckDuckGoSearchTool()
67
  #Youtube task
68
- video_translation = AudioTranscriptionTool()
69
- youtube_download = YouTubeAudioDownloadTool()
70
 
71
  with open("prompts.yaml", 'r') as stream:
72
  prompt_templates = yaml.safe_load(stream)
73
 
74
  #Agent
75
  agent_codeagent = CodeAgent(
76
- model=model,
77
- tools=[final_answer, wikipediaLookup, visitWebpage, webSearch, video_translation, youtube_download], ## add your tools here (don't remove final answer) duckDuckGoSearch,
78
  max_steps=3,
79
  verbosity_level=1,
80
  grammar=None,
@@ -93,7 +93,7 @@ def run_once(state):
93
  if questions_data is None or len(questions_data) == 0:
94
  return "No questions found or failed to load.", None
95
 
96
- question = questions_data[1]
97
  question_text = question["question"]
98
  task_id = question["task_id"]
99
  print(f"\nTask ID: {task_id}")
 
11
  from visit_webpage import VisitWebpageTool
12
  from web_search import web_search_DuckDuckGoSearchTool
13
  from wikipediaLookup import WikipediaLookupTool
14
+ # from video_translation import AudioTranscriptionTool
15
+ # from youtube_audio_download import YouTubeAudioDownloadTool
16
 
17
  api_url = "https://agents-course-unit4-scoring.hf.space"
18
  questions_url = f"{api_url}/questions"
 
65
  wikipediaLookup = WikipediaLookupTool()
66
  webSearch = web_search_DuckDuckGoSearchTool()
67
  #Youtube task
68
+ # video_translation = AudioTranscriptionTool()
69
+ # youtube_download = YouTubeAudioDownloadTool()
70
 
71
  with open("prompts.yaml", 'r') as stream:
72
  prompt_templates = yaml.safe_load(stream)
73
 
74
  #Agent
75
  agent_codeagent = CodeAgent(
76
+ model=model, #removed video_translation, youtube_download
77
+ tools=[final_answer, wikipediaLookup, visitWebpage, webSearch], ## add your tools here (don't remove final answer) duckDuckGoSearch,
78
  max_steps=3,
79
  verbosity_level=1,
80
  grammar=None,
 
93
  if questions_data is None or len(questions_data) == 0:
94
  return "No questions found or failed to load.", None
95
 
96
+ question = questions_data[0]
97
  question_text = question["question"]
98
  task_id = question["task_id"]
99
  print(f"\nTask ID: {task_id}")