Sandiago21 commited on
Commit
3e4645f
·
verified ·
1 Parent(s): 18da7a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -852,8 +852,8 @@ def tool_executor(state: AgentState):
852
  if "www.youtube.com" in str(action.args["url"]):
853
  video_id = action.args["url"].split("www.youtube.com/watch?v=")[-1]
854
  api = YouTubeTranscriptApi()
855
- webpage_information_complete = str(video_id)
856
  transcript = api.fetch(video_id)
 
857
  texts = [x.text for x in transcript]
858
  webpage_information_complete = " \n ".join(texts)
859
  else:
 
852
  if "www.youtube.com" in str(action.args["url"]):
853
  video_id = action.args["url"].split("www.youtube.com/watch?v=")[-1]
854
  api = YouTubeTranscriptApi()
 
855
  transcript = api.fetch(video_id)
856
+ webpage_information_complete = str(video_id)
857
  texts = [x.text for x in transcript]
858
  webpage_information_complete = " \n ".join(texts)
859
  else: