Update app.py
Browse files
app.py
CHANGED
@@ -119,7 +119,7 @@ class LangChainAgent:
|
|
119 |
def __call__(self, question: str, task_id: str) -> str:
|
120 |
urls = re.findall(r'https?://[^\s]+', question)
|
121 |
input_for_agent = {"input": question, "task_id": task_id}
|
122 |
-
if urls:
|
123 |
input_for_agent['video_url'] = urls[0]
|
124 |
|
125 |
try:
|
|
|
119 |
def __call__(self, question: str, task_id: str) -> str:
|
120 |
urls = re.findall(r'https?://[^\s]+', question)
|
121 |
input_for_agent = {"input": question, "task_id": task_id}
|
122 |
+
if urls and "youtube.com" in urls[0]:
|
123 |
input_for_agent['video_url'] = urls[0]
|
124 |
|
125 |
try:
|