Sandiago21 commited on
Commit
b0ab2ff
·
verified ·
1 Parent(s): 90845f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -852,9 +852,16 @@ 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
- 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:
860
  webpage_results = visit_webpage_wiki(result)
 
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
+ # texts = [x.text for x in transcript]
857
+ # webpage_information_complete = " \n ".join(texts)
858
+ texts = ["Wow this coffee's great I was just",
859
+ "thinking that",
860
+ "yeah is that cinnamon chicory",
861
+ "tea oak",
862
+ "[Music]",
863
+ "isn't that hot",
864
+ "extremely",]
865
  webpage_information_complete = " \n ".join(texts)
866
  else:
867
  webpage_results = visit_webpage_wiki(result)