Spaces:
Runtime error
Runtime error
| import requests | |
| API_URL = "https://agents-course-unit4-scoring.hf.space" | |
| QUESTIONS_URL = f"{API_URL}/questions" | |
| response = requests.get(QUESTIONS_URL, timeout=30) | |
| response.raise_for_status() | |
| questions = response.json() | |
| print(f"总题数: {len(questions)}\n") | |
| for i, item in enumerate(questions, start=1): | |
| print("=" * 80) | |
| print(f"第 {i} 题") | |
| print(f"task_id: {item.get('task_id')}") | |
| print(f"question: {item.get('question')}") | |
| print(f"file_name: {item.get('file_name', '')}") | |
| print() |