zorba111/ui-coordinates-finder
0
1import requests2import json3 4def test_api():5 url = "https://zorba11--ui-coordinates-finder-fastapi-app.modal.run/process"6 7 headers = {8 'Accept': 'application/json',9 }10 11 try:12 files = {13 'file': ('screen-1.png', open('/Users/zorba11/Desktop/screen-1.png', 'rb'), 'image/png')14 }15 16 response = requests.post(17 url,18 files=files,19 headers=headers20 )21 22 print(f"Status Code: {response.status_code}")23 print(f"Response Headers: {dict(response.headers)}")24 print(f"Response Content: {response.content.decode()}")25 26 except Exception as e:27 print(f"Error: {str(e)}")28 29if __name__ == "__main__":30 test_api()