2B / README.md
37-AN
Initial commit for Hugging Face Space deployment
4fe6054
|
raw
history blame
2.19 kB
---
title: Personal AI Assistant with RAG
emoji: 🤗
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
pinned: true
license: mit
---
# Personal AI Assistant with RAG
A powerful personal AI assistant that uses Retrieval-Augmented Generation (RAG) to provide responses based on your documents and notes.
## Features
- Uses free Hugging Face models for language processing and embeddings
- Stores and retrieves information in a vector database
- Upload PDF, TXT, and CSV files to expand the knowledge base
- Add direct text input to your knowledge base
- View sources for AI responses
- Conversation history tracking
## How to Use
1. **Upload Documents**: Use the sidebar to upload files (PDF, TXT, CSV)
2. **Add Text**: Enter text directly into the knowledge base
3. **Ask Questions**: Chat with the assistant about your documents
4. **View Sources**: See where information is coming from
## Deployment
### Local Deployment
To run the app locally:
1. Clone this repository
2. Install requirements: `pip install -r requirements.txt`
3. Run the Streamlit UI: `python run.py --ui`
4. Or run the API server: `python run.py --api`
### Deploying to Hugging Face Spaces
This application can be easily deployed to Hugging Face Spaces for free hosting:
1. Make sure you have a Hugging Face account
2. Create a Hugging Face API token at https://huggingface.co/settings/tokens
3. Run the deployment script: `python deploy_to_hf.py`
4. Follow the prompts to enter your username, token, and space name
5. Wait for the deployment to complete
If you encounter any issues during deployment, run `python check_git_status.py` to diagnose and fix common problems.
The deployment process:
- Creates a Hugging Face Space using the Spaces SDK
- Configures git for pushing to Hugging Face
- Pushes your code to the Space
- Builds and deploys the Docker container automatically
## Built With
- Hugging Face Models
- LLM: google/flan-t5-large
- Embeddings: sentence-transformers/all-MiniLM-L6-v2
- LangChain for orchestration
- Qdrant for vector storage
- Streamlit for UI
Created by [p3rc03](https://huggingface.co/p3rc03)
## License
MIT License - See LICENSE file for details