Spaces:
Sleeping
Sleeping
# test_gaia_questions.py | |
import requests | |
from langgraph_agents import graph | |
def test_with_real_gaia_questions(): | |
# Fetch questions directly from the benchmark API | |
url = "https://agents-course-unit4-scoring.hf.space/questions" | |
response = requests.get(url) | |
questions = response.json() | |
for q in questions[:5]: # Limit to first 5 for testing | |
question = q["question"] | |
task_id = q["task_id"] | |
state = {"question": question, "answer": ""} | |
result = graph.invoke(state) | |
print(f"[{task_id}] Q: {question}") | |
print(f"→ {result['answer']}") | |
print("-" * 60) | |
if __name__ == "__main__": | |
test_with_real_gaia_questions() | |