dalybuilds commited on
Commit
78cc7ba
·
verified ·
1 Parent(s): a738f5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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: