Spaces:
Sleeping
Sleeping
import os | |
from app import create_agent | |
# Initialize the agent | |
print("Creating agent for testing...") | |
agent = create_agent() | |
# Test cases from the logs that were failing | |
test_questions = [ | |
"How many studio albums were published by Mercedes Sosa between 2000 and 2009 (included)?", | |
".rewsna eht sa \"tfel\" drow eht fo etisoppo eht etirw ,ecnetnes siht dnatsrednu uoy fI", | |
"Who nominated the only Featured Article on English Wikipedia about a dinosaur that was promoted in November 2016?", | |
"What is the first name of the only Malko Competition recipient from the 20th Century (after 1977) whose nationality on record is a country that no longer exists?", | |
"In the video https://www.youtube.com/watch?v=L1vXCYZAYYM, what is the highest number of bird species to be on camera simultaneously?" | |
] | |
# Test the agent | |
for question in test_questions: | |
print(f"\nTesting question: {question}") | |
try: | |
response = agent.run(f"Answer this question concisely: {question}") | |
print(f"Agent answer: {response}") | |
except Exception as e: | |
print(f"Error: {e}") | |