-
Notifications
You must be signed in to change notification settings - Fork 13
/
run_app.sh
61 lines (32 loc) · 985 Bytes
/
run_app.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Update Ubuntu
apt update
#Download files
wget https://raw.githubusercontent.com/Kentemman/MessengerGPT/main/app.py
wget https://raw.githubusercontent.com/Kentemman/MessengerGPT/main/requirements.txt
# Install pip
apt install python3-pip
# Install dependencies from requirements.txt
sudo pip install -r requirements.txt
# Prompt user to enter OpenAI API key
echo "Please enter your OpenAI API key:"
read openai_api_key
# Replace OPEN_AI_API value in app.py with new value
export OPEN_AI_API=$open_api_key
printenv
# Prompt user to enter Facebook Page Access Token
echo "Please enter your Facebook Page Access Token:"
read page_token
# Replace PAGE_TOKEN value in app.py with new value
export PAGE_TOKEN=$page_token
printenv
# Print environment variables
echo "OPEN_AI_API: $OPEN_AI_API"
echo "PAGE_TOKEN: $PAGE_TOKEN"
#ngrok
ngrok
echo "Please enter your Ngrok Token:"
read ngrok_token
ngrok authtoken $ngrok_token
# Run app.py
python3 app.py