Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,10 +16,14 @@ if not os.path.exists(CHROMA_PATH):
|
|
16 |
|
17 |
# Set AI71 API key
|
18 |
AI71_API_KEY = os.environ.get('AI71_API_KEY')
|
|
|
|
|
|
|
|
|
19 |
|
20 |
# Download file utility
|
21 |
def download_file(url, ext):
|
22 |
-
local_filename = f'/
|
23 |
with requests.get(url, stream=True) as r:
|
24 |
with open(local_filename, 'wb') as f:
|
25 |
for chunk in r.iter_content(chunk_size=8192):
|
|
|
16 |
|
17 |
# Set AI71 API key
|
18 |
AI71_API_KEY = os.environ.get('AI71_API_KEY')
|
19 |
+
account_sid = os.environ.get('TWILIO_ACCOUNT_SID')
|
20 |
+
auth_token = os.environ.get('TWILIO_AUTH_TOKEN')
|
21 |
+
client = Client(account_sid, auth_token)
|
22 |
+
from_whatsapp_number = 'whatsapp:+14155238886'
|
23 |
|
24 |
# Download file utility
|
25 |
def download_file(url, ext):
|
26 |
+
local_filename = f'/tmp/uploaded_file{ext}'
|
27 |
with requests.get(url, stream=True) as r:
|
28 |
with open(local_filename, 'wb') as f:
|
29 |
for chunk in r.iter_content(chunk_size=8192):
|