File size: 382 Bytes
208a601
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import requests

url = "http://localhost:8000/fetch-images"  # or your deployed URL

payload = {
    "query": "sunset beach",
    "num_results": 5,
    "lang": "en",
    "advanced": False
}

response = requests.post(url, json=payload)

if response.ok:
    results = response.json()
    print("Fetched Images:", results)
else:
    print("Error:", response.status_code, response.text)