Rehman1603 commited on
Commit
27fb763
·
verified ·
1 Parent(s): 08ecc20

Upload 2 files

Browse files
Files changed (2) hide show
  1. fetch_data.py +20 -0
  2. requirements.txt +4 -0
fetch_data.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import json
3
+
4
+ def get_botpress_response(phone_no, message, business_id):
5
+ url = "https://whatsappmeta.hisabkarlay.com/whatsappmeta/botpress-response/"
6
+
7
+ payload = json.dumps({
8
+ "phone_no": phone_no,
9
+ "message": message,
10
+ "business_id": business_id
11
+ })
12
+
13
+ headers = {
14
+ 'Content-Type': 'application/json'
15
+ }
16
+
17
+ response = requests.post(url, headers=headers, data=payload)
18
+
19
+ return response.json().get('response')
20
+
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ TTS
2
+ torchaudio
3
+ whisper
4
+ git+https://github.com/openai/whisper.git