chipling-api / test.py
Maouu's picture
Implemented Google Search and Images Functionality
208a601
raw
history blame
382 Bytes
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)