This project is a chatbot designed to assist users with information related to a college website. It uses various libraries and APIs to fetch, process, and respond to user queries.
.env
.gitignore
app.py
college_bot.py
requirements.txt
.env
: Contains environment variables such as the API key..gitignore
: Specifies files and directories to be ignored by Git.app.py
: The main application file that runs the Streamlit app.college_bot.py
: Contains theCollege
class which handles data fetching, processing, and generating responses.requirements.txt
: Lists the dependencies required for the project.
-
Clone the repository:
git clone <repository-url> cd college_chatbot
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Set up the environment variables:
Create a
.env
file in the root directory and add your API key:API_KEY="your_api_key_here"
To run the Streamlit app, use the following command:
streamlit run app.py
This will start the Streamlit server, and you can interact with the chatbot through the web interface.
- The chatbot can answer questions related to the college website by fetching and processing data from specified URLs.
- The chatbot can also respond to greetings appropriately.
Logs are stored in the college_bot.log
file, which includes information about the initialization, data fetching, processing, and any errors encountered.
The project relies on the following libraries:
langchain-community
html2text
langchain_mistralai
streamlit
langchain_core
python-dotenv
requests
beautifulsoup4
These dependencies are listed in the requirements.txt
file and can be installed using pip
.
This project is licensed under the MIT License. See the LICENSE file for more details.