ChatBotDemo.mp4
To run this project, please follow the steps below:
-
Clone the repository:
git clone https://github.com/Samridhi16/ChatBot.git
This will create a local copy of the project on your machine.
-
Add the API key in
server.py
: Open theserver.py
file and locate the section where the API key for Open AI needs to be added. It will be a variable in theserver.py
file. Insert your API key in the designated place. -
Install the required dependencies:
- Make sure you have Python installed on your system. The project is compatible with Python versions between 3.7 and 3.9.
- Install the TTS library by running the following command:
pip install TTS
- Clone the TTS repository by executing the command:
git clone https://github.com/coqui-ai/TTS
You can refer to the TTS documentation (https://tts.readthedocs.io/en/latest/tutorial_for_nervous_beginners.html) for more details on its usage.
-
Open a terminal or command prompt and navigate to the project directory where the
startBot.py
,client.py
, andserver.py
files are located. -
Run the following command to build the executable file:
pyinstaller --onefile startBot.py
This command will package the Python script into a standalone executable file.
-
Locate the generated
startBot.exe
file in thedist
folder and keep it within the project directory whereserver.py
andclient.py
exist.
OR -
Start the server:
python server.py <port>
Replace with the desired port number to listen on.
Start the client:
python client.py <port> <client_number>
Replace with the same port number used for the server and <client_number> with a unique identifier for the client.
- Double-click on the
startBot.exe
file to run the program.