Update app.py
Browse files
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 |
-
|
| 857 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|