Spaces:
Sleeping
Sleeping
mattoofahaddcube
commited on
Commit
β’
4118340
1
Parent(s):
ff6f896
updating readme
Browse files- README.md +8 -59
- requirements.txt +0 -2
README.md
CHANGED
@@ -8,31 +8,6 @@ app_file: main.py
|
|
8 |
pinned: false
|
9 |
---
|
10 |
|
11 |
-
<!-- # Whatsapp-Chatbot
|
12 |
-
A simple repository to integrate a chatbot with whatsapp. -->
|
13 |
-
|
14 |
-
<!-- <p float="left">
|
15 |
-
<img src="" alt="screenshot1" width="300" style="margin-right: 20px;" />
|
16 |
-
<img src="" alt="screenshot2" width="300" />
|
17 |
-
</p> -->
|
18 |
-
|
19 |
-
<!-- ## Purpose and Features β¨ -->
|
20 |
-
|
21 |
-
|
22 |
-
<!-- ## Prerequisites π
|
23 |
-
|
24 |
-
To run and deploy the WhatsApp chatbot, you will need the following:
|
25 |
-
|
26 |
-
1. [Twilio Account](https://console.twilio.com/user/account-create): Create a Twilio account and obtain your Account SID and Auth Token.
|
27 |
-
|
28 |
-
2. WhatsApp Sandbox: Set up a WhatsApp Sandbox in your Twilio account to receive and send messages.
|
29 |
-
|
30 |
-
3. Python: Install Python on your local machine. The recommended version is Python 3.x.
|
31 |
-
|
32 |
-
4. Ngrok: [Download](https://ngrok.com/download) and install Ngrok from the official website (https://ngrok.com/) based on your operating system.
|
33 |
-
|
34 |
-
5. OpenAI API: Sign up for the OpenAI API and obtain your Secret API key from user settings (you may require a paid account for this). -->
|
35 |
-
|
36 |
## Installation and Usage
|
37 |
|
38 |
1. Create conda env
|
@@ -51,45 +26,19 @@ To run and deploy the WhatsApp chatbot, you will need the following:
|
|
51 |
pip install -r requirements.txt
|
52 |
```
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
## Docker
|
57 |
-
1. Create the docker container
|
58 |
-
```bash
|
59 |
-
docker build -t whatapp-endpoint .
|
60 |
-
```
|
61 |
-
|
62 |
-
2. run the container
|
63 |
-
```bash
|
64 |
-
docker run -p 7860:7860 whatapp-endpoint
|
65 |
-
``` -->
|
66 |
-
<!-- 4. Create a `.env` file in the root directory of the project. -->
|
67 |
-
|
68 |
-
<!-- 5. Add the following lines to the `.env` file:
|
69 |
-
|
70 |
-
```plaintext
|
71 |
-
TWILIO_ACCOUNT_SID=your_account_sid
|
72 |
-
TWILIO_AUTH_TOKEN=your_auth_token
|
73 |
-
OPENAI_API_KEY=your_openai_api_key
|
74 |
-
TWILIO_NUMBER= your_twilio_number
|
75 |
-
RECEIPENT_NUMBER= your_number
|
76 |
-
```
|
77 |
-
|
78 |
-
Replace `your_account_sid`, `your_auth_token`, `your_openai_api_key`, `your_twilio_number`, and `your_number` with your actual credentials. -->
|
79 |
-
|
80 |
-
|
81 |
-
5. Run the local server:
|
82 |
|
83 |
```bash
|
84 |
uvicorn main:app --host 0.0.0.0 --port 5000
|
85 |
```
|
86 |
|
87 |
-
|
88 |
-
|
89 |
```bash
|
90 |
-
|
91 |
```
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
|
8 |
pinned: false
|
9 |
---
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
## Installation and Usage
|
12 |
|
13 |
1. Create conda env
|
|
|
26 |
pip install -r requirements.txt
|
27 |
```
|
28 |
|
29 |
+
3. Run the local server:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
```bash
|
32 |
uvicorn main:app --host 0.0.0.0 --port 5000
|
33 |
```
|
34 |
|
35 |
+
## Docker
|
36 |
+
1. Create the docker container
|
37 |
```bash
|
38 |
+
docker build -t rest-server .
|
39 |
```
|
40 |
|
41 |
+
2. run the container
|
42 |
+
```bash
|
43 |
+
docker run -p 7860:7860 rest-server
|
44 |
+
```
|
requirements.txt
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
fastapi==0.111.1
|
2 |
uvicorn==0.30.1
|
3 |
-
twilio==8.2.2
|
4 |
-
openai==1.40.6
|
5 |
python-dotenv==1.0.1
|
6 |
colorama==0.4.6
|
|
|
1 |
fastapi==0.111.1
|
2 |
uvicorn==0.30.1
|
|
|
|
|
3 |
python-dotenv==1.0.1
|
4 |
colorama==0.4.6
|