lovepreetsingh1996 commited on
Commit
3902f7e
·
1 Parent(s): 986cdec

fix: video tool

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -31,8 +31,7 @@ class BasicAgent:
31
  # TODO inspect messages exchanged between the llm and the agent
32
 
33
  # self.llm = Ollama(model="qwen2.5:7b", request_timeout=500)
34
- self.llm = Gemini(model_name="models/gemini-2.0-pro-exp-02-05")
35
-
36
  def load_video_transcript(video_link: str) -> str:
37
  try:
38
  loader = YoutubeTranscriptReader()
@@ -49,7 +48,7 @@ class BasicAgent:
49
  load_video_transcript_tool = FunctionTool.from_defaults(
50
  load_video_transcript,
51
  name="load_video_transcript",
52
- description="Loads transcript of the given video using the link.",
53
  )
54
 
55
  def web_page_reader(url: str) -> str:
@@ -174,7 +173,7 @@ async def run_and_submit_all( profile: gr.OAuthProfile | None):
174
  answers_payload = []
175
  print(f"Running agent on {len(questions_data)} questions...")
176
  for item in questions_data:
177
- await asyncio.sleep(45)
178
  task_id = item.get("task_id")
179
  question_text = item.get("question")
180
  if not task_id or question_text is None:
 
31
  # TODO inspect messages exchanged between the llm and the agent
32
 
33
  # self.llm = Ollama(model="qwen2.5:7b", request_timeout=500)
34
+ self.llm = Gemini(model_name="models/gemini-2.0-flash")
 
35
  def load_video_transcript(video_link: str) -> str:
36
  try:
37
  loader = YoutubeTranscriptReader()
 
48
  load_video_transcript_tool = FunctionTool.from_defaults(
49
  load_video_transcript,
50
  name="load_video_transcript",
51
+ description="Loads transcript of the given video using the link. If some calls fail, we can still keep using this tool for others.",
52
  )
53
 
54
  def web_page_reader(url: str) -> str:
 
173
  answers_payload = []
174
  print(f"Running agent on {len(questions_data)} questions...")
175
  for item in questions_data:
176
+ await asyncio.sleep(20)
177
  task_id = item.get("task_id")
178
  question_text = item.get("question")
179
  if not task_id or question_text is None: