Certainly! Here's a README file for your Streamlit MineBot project:
chatbot for power substations
-
Clone the repository:
git clone https://github.com/yourusername/minebot.git cd minebot -
Create a virtual environment and activate it:
python -m venv env source env/bin/activate # On Windows use `env\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in the root directory and add your OpenAI and SerpAPI keys:OPENAI_API_KEY=your_openai_api_key SERPAPI_API_KEY=your_serpapi_api_key -
Download the embedding model and index:
- Ensure the embedding model
BAAI/bge-large-en-v1.5is available in themodel_cachefolder. - Ensure the FAISS index
clean_total_index_bge_largeis available in the root directory.
- Ensure the embedding model
-
Run the Streamlit app:
streamlit run app.py
-
Activate the system:
- Go to the sidebar and click on "Activate" to load the models and tools.
-
Start chatting:
- Use the chat input at the bottom of the page to ask questions related to mining regulations, and the bot will respond accordingly.
minebot/
├── .env.example # Example environment file
├── app.py # Main application file
├── requirements.txt # List of Python dependencies
├── model_cache/ # Directory for embedding model cache
└── clean_total_index_bge_large # FAISS index file
-
CSS and HTML Templates:
- Customize the look and feel of the chat interface by modifying the
CSS,bot_template, anduser_templatevariables inapp.py.
- Customize the look and feel of the chat interface by modifying the
-
Tools and Memory:
- Add or modify tools in the
get_toolsfunction. - Change memory settings in the
get_memoryfunction.
- Add or modify tools in the
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes.
- Commit your changes:
git commit -m "Add some feature" - Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to customize the README further to fit your specific needs.