A helpful assistant to help you find answers to questions
MIT License
AI Assistant is an advanced Natural Language Processing (NLP) suite designed to provide intelligent, context-aware responses to user queries. This project leverages cutting-edge machine learning techniques, web scraping, and the OpenAI API to deliver accurate and comprehensive answers. The system features a user-friendly Streamlit GUI, making it accessible for both technical and non-technical users.
Clone the repository:
git clone https://github.com/slyfox1186/ai-assistant.git
cd ai-assistant
Create and activate a Conda environment:
conda create --name ai_assistant python=3.12.2
conda activate ai_assistant
Install the required dependencies:
pip install -r requirements.txt
Set up your OpenAI API key:
config.py
file in the project rootOPENAI_API_KEY = "your-api-key-here"
Before running the AI Assistant, you need to download the necessary NLP models. Run the following commands:
Download the spaCy model:
python -m spacy download en_core_web_trf
Download the Flair model:
python -m flair.models.text_classification.sentiment download
Download the Hugging Face transformers models:
python -c "from transformers import AutoTokenizer, AutoModel; AutoTokenizer.from_pretrained('sentence-transformers/all-MiniLM-L6-v2'); AutoModel.from_pretrained('sentence-transformers/all-MiniLM-L6-v2')"
These commands will download and cache the required models for NER processing, sentiment analysis, and similarity checking.
To launch the AI Assistant with the Streamlit GUI, run:
streamlit run main.py
This will start the Streamlit server and open the AI Assistant interface in your default web browser. By default, it will run on http://localhost:8501
.
If you want to specify a different port or host, you can use:
streamlit run main.py --server.port 8080 --server.address 0.0.0.0
config.py
)main.py
: The core script that launches the Streamlit interface and orchestrates the entire processopenai_handler.py
: Manages interactions with the OpenAI APIweb_scraper.py
: Handles web scraping for additional informationdata_manager.py
: Manages data storage and retrieval, including local cachingsimilarity_checker.py
: Compares queries to find similar previous interactionsmodel_trainer.py
: Handles the training and updating of local modelsner_processor.py
: Processes named entities in the textAdjust the following files to customize the AI Assistant:
config.py
: Set API keys, model parameters, and other global settingsrequirements.txt
: Manage project dependenciesWe welcome contributions to the AI Assistant project! Here's how you can help:
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Please ensure your code adheres to the project's coding standards and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.
Project Link: https://github.com/slyfox1186/ai-assistant
For support or queries, please open an issue in the GitHub repository or contact slyfox1186.
We hope you find the AI Assistant useful for your NLP tasks. Your feedback and contributions are highly app