bako96 commited on
Commit
4d55c5b
·
verified ·
1 Parent(s): 11458ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,7 +17,7 @@ def get_youtube_channel_info(channel_name: str) -> str:
17
  try:
18
  # Initialize DuckDuckGoSearchTool with a maximum of 5 results
19
  search_tool = DuckDuckGoSearchTool(max_results=5)
20
- query = f"{channel_name} YouTube channel information"
21
  print(f"Searching for: {query}") # Debug print statement
22
 
23
  # Perform the search
@@ -25,7 +25,7 @@ def get_youtube_channel_info(channel_name: str) -> str:
25
  print(f"Raw search results:\n{search_results}") # Debug print statement
26
 
27
  # Return the formatted search results
28
- return f"Search results for '{channel_name}':\n\n{search_results}"
29
  except Exception as e:
30
  print(f"Error occurred while searching for '{channel_name}': {str(e)}") # Debug print statement
31
  return f"Error fetching YouTube channel information: {str(e)}"
 
17
  try:
18
  # Initialize DuckDuckGoSearchTool with a maximum of 5 results
19
  search_tool = DuckDuckGoSearchTool(max_results=5)
20
+ query = f"{channel_name} YouTube channel Description"
21
  print(f"Searching for: {query}") # Debug print statement
22
 
23
  # Perform the search
 
25
  print(f"Raw search results:\n{search_results}") # Debug print statement
26
 
27
  # Return the formatted search results
28
+ return f"Search results for '{channel_name}':\n\n{search_results[0:3]}"
29
  except Exception as e:
30
  print(f"Error occurred while searching for '{channel_name}': {str(e)}") # Debug print statement
31
  return f"Error fetching YouTube channel information: {str(e)}"