Spaces:
Paused
Paused
Download fetch_data.py from Rehman1603/media_check: direct link, hf CLI and curl.
- Browser
- Download file 490 Bytes
-
https://huggingface.co/spaces/Rehman1603/media_check/resolve/main/fetch_data.py
- Command line
-
hf download hf://spaces/Rehman1603/media_check/fetch_data.py
-
curl -L -o fetch_data.py https://huggingface.co/spaces/Rehman1603/media_check/resolve/main/fetch_data.py
490 Bytes
| import requests | |
| import json | |
| def get_botpress_response(phone_no, message, business_id): | |
| url = "https://whatsappmeta.hisabkarlay.com/whatsappmeta/botpress-response/" | |
| payload = json.dumps({ | |
| "phone_no": phone_no, | |
| "message": message, | |
| "business_id": business_id | |
| }) | |
| headers = { | |
| 'Content-Type': 'application/json' | |
| } | |
| response = requests.post(url, headers=headers, data=payload) | |
| return response.json().get('response') | |