File size: 389 Bytes
58b2d80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import requests

BASE_URL = "https://agents-course-unit4-scoring.hf.space"

def get_random_question():
    response = requests.get(f"{BASE_URL}/random-question")
    return response.json()

def get_all_questions():
    response = requests.get(f"{BASE_URL}/questions")
    return response.json()

# Fetch one random question to test quickly
question = get_random_question()
print(question)